MooseX...pt::GLD(3pm)
π MooseX::Getopt::GLD π
okay bestie, so this is MooseX::Getopt::GLD β it's the manual page for it (that's the (3pm) bit, iykyk). And lowkey? It's a Moose role that handles your command line options for you, using Getopt::Long::Descriptive under the hood. Main character energy fr. π
Version: 0.78 β yeah she's got a version number and she's proud of it β¨
π SYNOPSIS π
so here's the whole vibe. First you do it in your class:
## In your class
package My::App;
use Moose;
with 'MooseX::Getopt::GLD';
# or
with 'MooseX::Getopt::GLD' => { getopt_conf => [ 'pass_through', ... ] };
has 'out' => (is => 'rw', isa => 'Str', required => 1);
has 'in' => (is => 'rw', isa => 'Str', required => 1);
# ... rest of the class here
then in your actual 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 you just go off:
## on the command line
% perl my_app_script.pl -in file.input -out file.dump
ate. no crumbs. π
β¨ OPTIONS β¨
okay so listen, this role is a parameterized role β meaning it takes a lil config of its own before it does its thing. She accepts exactly one configuration parameter:
getopt_confβ an ArrayRef of strings, bestie. Each string is a Getopt::Long configuration option. If you wanna know what those look like, go read "Configuring Getopt::Long" in Getopt::Long. that's the lore. π
π«Ά SUPPORT π«Ά
found a bug? not on my watch. Bugs may be submitted through the RT bug tracker:
or you can email bug-MooseX-Getopt@rt.cpan.org β both paths work, pick your fighter. π
There's also a mailing list for users of this distribution, right here:
and if you wanna just vibe and chat, there's an irc channel for users of this distribution too β it's #moose on irc.perl.org (that's <irc://irc.perl.org/#moose>). come hang out, we don't bite. π¦
πΈ AUTHOR πΈ
Stevan Little <stevan@iinteractive.com> β legend behavior, honestly. π
π COPYRIGHT AND LICENSE π
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. so like, go forth and remix, queen. π
and that's the whole page, bestie!! this wasperl v5.40.0, dated2025-01-11, and it's the User Contributed Perl Documentation version of MooseX...pt::GLD(3pm) π§ stay slaying, and remember: read your docs before yourm -rfanything ππ
π¦ where this page comes from
- debian trixie: libmoosex-getopt-perl 0.78-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmoosex-getopt-perl 0.78-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmoosex-getopt-perl 0.78-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms