X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Foose.pm;h=37576bd4b5e84aea834912fd31dff8b2012a8454;hb=8fa582b1a83065191c20f8bca2d53c491fb6a314;hp=d19901cf3ceb2efb803fb92ae3bac5cf212ff602;hpb=eae0508f6f8fca847956c2ed8c48ec23cebd3106;p=gitmo%2FMoose.git diff --git a/lib/oose.pm b/lib/oose.pm index d19901c..37576bd 100644 --- a/lib/oose.pm +++ b/lib/oose.pm @@ -5,7 +5,7 @@ use warnings; use Class::MOP; -our $VERSION = '0.81'; +our $VERSION = '0.93'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -18,7 +18,7 @@ BEGIN { Class::MOP::load_class($package); } } - use Filter::Simple sub { s/^/package $package;\nuse Moose;\n/; } + use Filter::Simple sub { s/^/package $package;\nuse Moose;use Moose::Util::TypeConstraints;\n/; } } 1; @@ -41,6 +41,9 @@ oose - syntactic sugar to make Moose one-liners easier # debugging/introspection easier perl -Moose=+My::Class -e 'print join ", " => __PACKAGE__->meta->get_method_list' + # also loads Moose::Util::TypeConstraints to allow subtypes etc + perl -Moose=Person -e'subtype q[ValidAge] => as q[Int] => where { $_ > 0 && $_ < 78 }; has => age ( isa => q[ValidAge], is => q[ro]); Person->new(age => 90)' + =head1 DESCRIPTION oose.pm is a simple source filter that adds C @@ -75,7 +78,7 @@ to cpan-RT. =head1 AUTHOR -Chris Prather C<< >> +Chris Prather C<< >> =head1 COPYRIGHT AND LICENSE