X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Foose.pm;h=70e132197a240d43e7f066173decf87d126ea50f;hb=72643035d73124e0b4ef7a8335cdc4f793732b5a;hp=83654b2b961c3078b5969f8c08c2023b54540f0d;hpb=b9e554fa0ec9cc28204f8b309874e83faf72b61c;p=gitmo%2FMoose.git diff --git a/lib/oose.pm b/lib/oose.pm index 83654b2..70e1321 100644 --- a/lib/oose.pm +++ b/lib/oose.pm @@ -5,7 +5,7 @@ use warnings; use Class::MOP; -our $VERSION = '0.89'; +our $VERSION = '1.08'; $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 @@ -69,13 +72,11 @@ None reported. But it is a source filter and might have issues there. =head1 BUGS -All complex software has bugs lurking in it, and this module is no -exception. If you find a bug please either email me, or add the bug -to cpan-RT. +See L for details on reporting bugs. =head1 AUTHOR -Chris Prather C<< >> +Chris Prather C<< >> =head1 COPYRIGHT AND LICENSE