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. πŸ‘‘


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 was perl v5.40.0, dated 2025-01-11, and it's the User Contributed Perl Documentation version of MooseX...pt::GLD(3pm) 🧚 stay slaying, and remember: read your docs before you rm -rf anything πŸ’€πŸ’–
πŸ“¦ where this page comes from