MooseX...::Basic(3pm)

✨ NAME ✨

bestie. say hi to MooseX::Getopt::Basic πŸ’– β€” it's a role that implements the Getopt::Long functionality for you, so your class can just... read the command line like it's nothing. periodt.


🌸 VERSION 🌸

version 0.78 πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so first, in your class:

## In your class
package My::App;
use Moose;

with 'MooseX::Getopt::Basic';

has 'out' => (is => 'rw', isa => 'Str', required => 1);
has 'in'  => (is => 'rw', isa => 'Str', required => 1);

# ... rest of the class here

then in your script:

## in your script
#!/usr/bin/perl

use My::App;

my $app = My::App->new_with_options();
# ... rest of the script here

and then on the command line, the moment of truth ✨:

## on the command line
% perl my_app_script.pl --in file.input --out file.dump

like. that's it. that's the whole vibe. πŸ‘‘


πŸ’… DESCRIPTION πŸ’…

so MooseX::Getopt::Basic is basically MooseX::Getopt's twin β€” you can use it instead β€” with one lil' difference: it does not make use of Getopt::Long::Descriptive (or "GLD" for short). no GLD, no problem, bestie 🫢.


🌈 METHODS 🌈

⭐ new_with_options

See "new_with_options" in MooseX::Getopt. iykyk πŸ’œ

⭐ process_argv

See "process_argv" in MooseX::Getopt. same energy, go look πŸ‘€


πŸŽ€ SUPPORT πŸŽ€

got bugs? they may be submitted through the RT bug tracker at <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Getopt> πŸ› (or, if you're feeling email-y, bug-MooseX-Getopt@rt.cpan.org <mailto:bug-MooseX-Getopt@rt.cpan.org>).

there's also a mailing list for users of this distribution, living at <http://lists.perl.org/list/moose.html> πŸ’Œ

and there's an irc channel for users of this distribution too, at "#moose" on "irc.perl.org" <irc://irc.perl.org/#moose> β€” come hang, fr fr 🌸


πŸ‘‘ AUTHOR πŸ‘‘

Stevan Little <stevan@iinteractive.com> β€” icon, legend, the moment πŸ’–


This software is copyright (c) 2007 by Infinity Interactive, Inc. πŸŽ€

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay. πŸ’…


okay that's the whole page bestie!! this was pulled straight from the perl v5.40.0 docs, dated 2025-01-11, and the original header/footer said MooseX...::Basic(3pm) β€” mwah, go write something iconic πŸ’œβœ¨

πŸ“¦ where this page comes from