From: Rafael Kitover Date: Mon, 15 Jun 2009 21:39:40 +0000 (-0700) Subject: skeleton X-Git-Tag: 0.04~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7a603ffaf368e45a344d029e716ea36b10794e40;p=gitmo%2FMooseX-AlwaysCoerce.git skeleton --- 7a603ffaf368e45a344d029e716ea36b10794e40 diff --git a/Changes b/Changes new file mode 100644 index 0000000..2bd3c03 --- /dev/null +++ b/Changes @@ -0,0 +1 @@ +Revision history for MooseX-AlwaysCoerce diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..da68f02 --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,18 @@ +use inc::Module::Install; + +name 'MooseX-AlwaysCoerce'; +all_from 'lib/MooseX/AlwaysCoerce.pm'; +author 'Rafael Kitover '; +license 'perl'; + +test_requires 'Test::More'; + +requires 'Moose'; + +auto_provides; +auto_install; + +resources repository => + 'git://github.com/rkitover/mx-alwayscoerce.git'; + +WriteAll; diff --git a/README b/README new file mode 100644 index 0000000..d421976 --- /dev/null +++ b/README @@ -0,0 +1,42 @@ +MooseX-AlwaysCoerce + +Moose extension to always enable coercions for attributes. + +INSTALLATION + +To install this module, run the following commands: + + perl Makefile.PL + make + make test + make install + +SUPPORT AND DOCUMENTATION + +After installing, you can find documentation for this module with the +perldoc command. + + perldoc MooseX::AlwaysCoerce + +You can also look for information at: + + RT, CPAN's request tracker + http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooseX-AlwaysCoerce + + AnnoCPAN, Annotated CPAN documentation + http://annocpan.org/dist/MooseX-AlwaysCoerce + + CPAN Ratings + http://cpanratings.perl.org/d/MooseX-AlwaysCoerce + + Search CPAN + http://search.cpan.org/dist/MooseX-AlwaysCoerce/ + + +COPYRIGHT AND LICENCE + +Copyright (C) 2009 Rafael Kitover + +This program is free software; you can redistribute it and/or modify it +under the same terms as Perl itself. + diff --git a/lib/MooseX/AlwaysCoerce.pm b/lib/MooseX/AlwaysCoerce.pm new file mode 100644 index 0000000..6ab536e --- /dev/null +++ b/lib/MooseX/AlwaysCoerce.pm @@ -0,0 +1,75 @@ +package MooseX::AlwaysCoerce; + +use strict; +use warnings; + +=head1 NAME + +MooseX::AlwaysCoerce - Automatically enable coercions for Moose attributes + +=head1 VERSION + +Version 0.01 + +=cut + +our $VERSION = '0.01'; + +=head1 SYNOPSIS + + package MyClass; + + use Moose; + use MooseX::AlwaysCoerce; + use MyTypeLib 'SomeType'; + + has foo => (is => 'rw', isa => SomeType); # will be coerced + +=head1 AUTHOR + +Rafael Kitover, C<< >> + +=head1 BUGS + +Please report any bugs or feature requests to C, or through +the web interface at L. I will be notified, and then you'll +automatically be notified of progress on your bug as I make changes. + +=head1 SUPPORT + +You can find more information at: + +=over 4 + +=item * RT: CPAN's request tracker + +L + +=item * AnnoCPAN: Annotated CPAN documentation + +L + +=item * CPAN Ratings + +L + +=item * Search CPAN + +L + +=back + +=head1 ACKNOWLEDGEMENTS + +My own stupidity, for inspiring me to write this module. + +=head1 COPYRIGHT & LICENSE + +Copyright (c) 2009 Rafael Kitover + +This program is free software; you can redistribute it and/or modify it +under the same terms as Perl itself. + +=cut + +1; # End of MooseX::AlwaysCoerce diff --git a/t/00-load.t b/t/00-load.t new file mode 100644 index 0000000..61daa40 --- /dev/null +++ b/t/00-load.t @@ -0,0 +1,9 @@ +#!perl -T + +use Test::More tests => 1; + +BEGIN { + use_ok( 'MooseX::AlwaysCoerce' ); +} + +diag( "Testing MooseX::AlwaysCoerce $MooseX::AlwaysCoerce::VERSION, Perl $], $^X" ); diff --git a/t/pod.t b/t/pod.t new file mode 100644 index 0000000..ee8b18a --- /dev/null +++ b/t/pod.t @@ -0,0 +1,12 @@ +#!perl -T + +use strict; +use warnings; +use Test::More; + +# Ensure a recent version of Test::Pod +my $min_tp = 1.22; +eval "use Test::Pod $min_tp"; +plan skip_all => "Test::Pod $min_tp required for testing POD" if $@; + +all_pod_files_ok();