Skip to content

Instantly share code, notes, and snippets.

@btisdall
Created June 6, 2012 09:53
Show Gist options
  • Save btisdall/2881015 to your computer and use it in GitHub Desktop.
Save btisdall/2881015 to your computer and use it in GitHub Desktop.
# MyClass.pm
package Cloud::Meta::Attribute::Trait::UserData;
use Moose::Role;
has 'is_userdata' => (
is => 'ro',
isa => 'Bool',
default => 1,
);
package Moose::Meta::Attribute::Custom::Trait::UserData;
sub register_implementation { 'Cloud::Meta::Attribute::Trait::UserData' }
use MooseX::Declare;
class MyClass {
# ...
---
# MyClass/Cmd.pm
package MyClass::Cmd;
use Moose;
use MooseX::Getopt;
extends qw(MooseX::App::Cmd);
---
# MyClass/Cmd/Command/start.pm
package MyClass::Cmd::Command::start;
use Moose;
use Carp;
extends qw(MooseX::App::Cmd::Command MyClass);
sub execute {
my ( $self, $opt, $args ) = @_;
# ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment