From: Dave Rolsky Date: Mon, 14 Mar 2011 18:39:00 +0000 (-0500) Subject: Dzilize this distro X-Git-Tag: 0.10~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b2c5b43cb2decfa49933f4254050716bc7ff91e0;p=gitmo%2FMooseX-UndefTolerant.git Dzilize this distro Also removed some space at the end of lines --- diff --git a/MANIFEST b/MANIFEST deleted file mode 100644 index b505618..0000000 --- a/MANIFEST +++ /dev/null @@ -1,22 +0,0 @@ -Changes -ignore.txt -inc/Module/Install.pm -inc/Module/Install/Base.pm -inc/Module/Install/Can.pm -inc/Module/Install/Fetch.pm -inc/Module/Install/Makefile.pm -inc/Module/Install/Metadata.pm -inc/Module/Install/Win32.pm -inc/Module/Install/WriteAll.pm -lib/MooseX/UndefTolerant.pm -lib/MooseX/UndefTolerant/Attribute.pm -lib/MooseX/UndefTolerant/Class.pm -lib/MooseX/UndefTolerant/Constructor.pm -Makefile.PL -MANIFEST This list of files -META.yml -README -t/00-load.t -t/constructor.t -t/defaults.t -t/immutable.t diff --git a/Makefile.PL b/Makefile.PL deleted file mode 100644 index 6fadbfc..0000000 --- a/Makefile.PL +++ /dev/null @@ -1,14 +0,0 @@ -use inc::Module::Install; - -name 'MooseX-UndefTolerant'; -all_from 'lib/MooseX/UndefTolerant.pm'; -author q{Cory G Watson }; -license 'perl'; - -build_requires 'Test::Fatal'; -build_requires 'Test::More' => '0.002'; - -requires 'Moose' => '0.89'; -requires 'Moose::Exporter'; - -WriteAll; diff --git a/dist.ini b/dist.ini new file mode 100644 index 0000000..cc7fd11 --- /dev/null +++ b/dist.ini @@ -0,0 +1,41 @@ +name = MooseX-UndefTolerant +author = Cory G Watson +license = Perl_5 +copyright_holder = Cory G Watson +copyright_year = 2011 + +version = 0.09 + +[@Filter] +-bundle = @Basic +-remove = Readme + +[InstallGuide] +[MetaJSON] + +[MetaResources] +bugtracker.web = http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooseX-UndefTolerant +bugtracker.mailto = bug-moosex-undeftolerant@rt.cpan.org +repository.url = https://github.com/gphat/moosex-undeftolerant.git +repository.web = https://github.com/gphat/moosex-undeftolerant +repository.type = git + +[SurgicalPodWeaver] + +[PkgVersion] + +[PodSyntaxTests] +[NoTabsTests] +[EOLTests] +[Signature] + +[CheckChangeLog] + +[Prereqs / BuildRequires] +Test::Fatal = 0 +Test::More = 0.002 + +[Prereqs] +Moose = 0.89 + + diff --git a/lib/MooseX/UndefTolerant.pm b/lib/MooseX/UndefTolerant.pm index f666558..feda0ea 100644 --- a/lib/MooseX/UndefTolerant.pm +++ b/lib/MooseX/UndefTolerant.pm @@ -7,7 +7,6 @@ use MooseX::UndefTolerant::Attribute; use MooseX::UndefTolerant::Class; use MooseX::UndefTolerant::Constructor; -our $VERSION = '0.09'; my %metaroles = ( attribute => [ 'MooseX::UndefTolerant::Attribute' ] ); if ( $Moose::VERSION < 1.9900 ) { @@ -24,11 +23,9 @@ Moose::Exporter->setup_import_methods( 1; -__END__ - -=head1 NAME +# ABSTRACT: Make your attribute(s) tolerant to undef initialization -MooseX::UndefTolerant - Make your attribute(s) tolerant to undef initialization +__END__ =head1 SYNOPSIS @@ -114,10 +111,6 @@ inlined constructor initialization code currently lives in L, not L. The good news is that this is expected to be changing shortly. -=head1 AUTHOR - -Cory G Watson, C<< >> - =head1 ACKNOWLEDGEMENTS Many thanks to the crew in #moose who talked me through this module: @@ -134,14 +127,4 @@ Jay Shirley (jshirley) Mike Eldridge (diz) -=head1 COPYRIGHT & LICENSE - -Copyright 2009 Cory G Watson. - -This program is free software; you can redistribute it and/or modify it -under the terms of either: the GNU General Public License as published -by the Free Software Foundation; or the Artistic License. - -See http://dev.perl.org/licenses/ for more information. - =cut diff --git a/lib/MooseX/UndefTolerant/Attribute.pm b/lib/MooseX/UndefTolerant/Attribute.pm index 97ad7ea..15d35dd 100644 --- a/lib/MooseX/UndefTolerant/Attribute.pm +++ b/lib/MooseX/UndefTolerant/Attribute.pm @@ -17,9 +17,9 @@ around('initialize_instance_slot', sub { 1; -=head1 NAME +# ABSTRACT: Make your attribute(s) tolerant to undef intitialization -MooseX::UndefTolerant::Attribute - Make your attribute(s) tolerant to undef intitialization +__END__ =head1 SYNOPSIS @@ -45,21 +45,7 @@ MooseX::UndefTolerant::Attribute - Make your attribute(s) tolerant to undef inti Applying this trait to your attribute makes it's initialization tolerant of of undef. If you specify the value of undef to any of the attributes they -will not be initialized (or will be set to the default, if applicable). +will not be initialized (or will be set to the default, if applicable). Effectively behaving as if you had not provided a value at all. -=head1 AUTHOR - -Cory G Watson, C<< >> - -=head1 COPYRIGHT & LICENSE - -Copyright 2009 Cory G Watson. - -This program is free software; you can redistribute it and/or modify it -under the terms of either: the GNU General Public License as published -by the Free Software Foundation; or the Artistic License. - -See http://dev.perl.org/licenses/ for more information. - =cut diff --git a/lib/MooseX/UndefTolerant/Constructor.pm b/lib/MooseX/UndefTolerant/Constructor.pm index b9ccc0b..2463bf2 100644 --- a/lib/MooseX/UndefTolerant/Constructor.pm +++ b/lib/MooseX/UndefTolerant/Constructor.pm @@ -13,8 +13,8 @@ if ( $Moose::VERSION < 1.9900 ) { # clearing the param if it's undefined. if (defined $key_name) { - my $tolerant_code = - qq# delete \$params->{'$key_name'} unless # . + my $tolerant_code = + qq# delete \$params->{'$key_name'} unless # . qq# exists \$params->{'$key_name'} && defined \$params->{'$key_name'};\n#; return $tolerant_code . $self->$orig(@_);