+++ /dev/null
-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
+++ /dev/null
-use inc::Module::Install;
-
-name 'MooseX-UndefTolerant';
-all_from 'lib/MooseX/UndefTolerant.pm';
-author q{Cory G Watson <gphat@cpan.org>};
-license 'perl';
-
-build_requires 'Test::Fatal';
-build_requires 'Test::More' => '0.002';
-
-requires 'Moose' => '0.89';
-requires 'Moose::Exporter';
-
-WriteAll;
--- /dev/null
+name = MooseX-UndefTolerant
+author = Cory G Watson <gphat at cpan.org>
+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
+
+
use MooseX::UndefTolerant::Class;
use MooseX::UndefTolerant::Constructor;
-our $VERSION = '0.09';
my %metaroles = ( attribute => [ 'MooseX::UndefTolerant::Attribute' ] );
if ( $Moose::VERSION < 1.9900 ) {
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
L<Moose::Meta::Method::Constructor>, not L<Moose::Meta::Attribute>. The good
news is that this is expected to be changing shortly.
-=head1 AUTHOR
-
-Cory G Watson, C<< <gphat at cpan.org> >>
-
=head1 ACKNOWLEDGEMENTS
Many thanks to the crew in #moose who talked me through this module:
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
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
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<< <gphat at cpan.org> >>
-
-=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
# 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(@_);