Skip to content

Instantly share code, notes, and snippets.

@oalders
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oalders/e8dd74c0cf19744aed39 to your computer and use it in GitHub Desktop.
Save oalders/e8dd74c0cf19744aed39 to your computer and use it in GitHub Desktop.
package Foo;
use Moose;
with 'MooseX::Getopt';
has foo => (
is => 'ro',
isa => 'Int',
init_arg => 'bar',
required => 1,
documentation => 'foo has init_arg of bar',
);
sub run {
my $self = shift;
print $self->foo;
}
__PACKAGE__->meta->make_immutable();
1;
package main;
Foo->new_with_options->run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment