r69826 - in /branches/upstream/libmoosex-nonmoose-perl/current: ./ lib/MooseX/ lib/MooseX/NonMoose/ lib/MooseX/NonMoose/Meta/Role/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Sun Feb 27 03:10:06 UTC 2011
Author: jawnsy-guest
Date: Sun Feb 27 03:09:41 2011
New Revision: 69826
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=69826
Log:
[svn-upgrade] new version libmoosex-nonmoose-perl (0.18)
Modified:
branches/upstream/libmoosex-nonmoose-perl/current/Changes
branches/upstream/libmoosex-nonmoose-perl/current/LICENSE
branches/upstream/libmoosex-nonmoose-perl/current/META.json
branches/upstream/libmoosex-nonmoose-perl/current/META.yml
branches/upstream/libmoosex-nonmoose-perl/current/Makefile.PL
branches/upstream/libmoosex-nonmoose-perl/current/README
branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose.pm
branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose/InsideOut.pm
branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose/Meta/Role/Class.pm
branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose/Meta/Role/Constructor.pm
branches/upstream/libmoosex-nonmoose-perl/current/weaver.ini
Modified: branches/upstream/libmoosex-nonmoose-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-nonmoose-perl/current/Changes?rev=69826&op=diff
==============================================================================
--- branches/upstream/libmoosex-nonmoose-perl/current/Changes (original)
+++ branches/upstream/libmoosex-nonmoose-perl/current/Changes Sun Feb 27 03:09:41 2011
@@ -1,4 +1,7 @@
Revision history for MooseX-NonMoose
+
+0.18 2011-02-09
+ - forward compat for Moose 2.0
0.17 2010-11-08
- convert to Test::Fatal, and dep on it
Modified: branches/upstream/libmoosex-nonmoose-perl/current/LICENSE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-nonmoose-perl/current/LICENSE?rev=69826&op=diff
==============================================================================
--- branches/upstream/libmoosex-nonmoose-perl/current/LICENSE (original)
+++ branches/upstream/libmoosex-nonmoose-perl/current/LICENSE Sun Feb 27 03:09:41 2011
@@ -1,4 +1,4 @@
-This software is copyright (c) 2010 by Jesse Luehrs.
+This software is copyright (c) 2011 by Jesse Luehrs.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@
--- The GNU General Public License, Version 1, February 1989 ---
-This software is Copyright (c) 2010 by Jesse Luehrs.
+This software is Copyright (c) 2011 by Jesse Luehrs.
This is free software, licensed under:
@@ -270,7 +270,7 @@
--- The Artistic License 1.0 ---
-This software is Copyright (c) 2010 by Jesse Luehrs.
+This software is Copyright (c) 2011 by Jesse Luehrs.
This is free software, licensed under:
Modified: branches/upstream/libmoosex-nonmoose-perl/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-nonmoose-perl/current/META.json?rev=69826&op=diff
==============================================================================
--- branches/upstream/libmoosex-nonmoose-perl/current/META.json (original)
+++ branches/upstream/libmoosex-nonmoose-perl/current/META.json Sun Feb 27 03:09:41 2011
@@ -4,7 +4,7 @@
"Jesse Luehrs <doy at tozt dot net>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.102342, CPAN::Meta::Converter version 2.101670",
+ "generated_by" : "Dist::Zilla version 4.200000, CPAN::Meta::Converter version 2.101670",
"license" : [
"perl_5"
],
@@ -38,88 +38,88 @@
"url" : "git://github.com/doy/moosex-nonmoose.git"
}
},
- "version" : "0.17",
+ "version" : "0.18",
"x_Dist_Zilla" : {
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::GatherDir",
"name" : "@DOY/GatherDir",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@DOY/PruneCruft",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@DOY/ManifestSkip",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@DOY/MetaYAML",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@DOY/License",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@DOY/Readme",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::ExtraTests",
"name" : "@DOY/ExtraTests",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@DOY/ExecDir",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@DOY/ShareDir",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"name" : "@DOY/MakeMaker",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@DOY/Manifest",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@DOY/TestRelease",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@DOY/ConfirmRelease",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@DOY/MetaConfig",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@DOY/MetaJSON",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@DOY/NextRelease",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::CheckChangesHasContent",
@@ -129,17 +129,17 @@
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@DOY/PkgVersion",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::PodCoverageTests",
"name" : "@DOY/PodCoverageTests",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@DOY/PodSyntaxTests",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::NoTabsTests",
@@ -164,12 +164,12 @@
{
"class" : "Dist::Zilla::Plugin::Git::Check",
"name" : "@DOY/Git::Check",
- "version" : "1.102010"
+ "version" : "1.103520"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
"name" : "@DOY/Git::Tag",
- "version" : "1.102010"
+ "version" : "1.103520"
},
{
"class" : "Dist::Zilla::Plugin::BumpVersionFromGit",
@@ -184,7 +184,7 @@
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@DOY/UploadToCPAN",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -195,7 +195,7 @@
}
},
"name" : "Prereqs",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -206,27 +206,27 @@
}
},
"name" : "TestRequires",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "4.102342"
+ "version" : "4.200000"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "4.102342"
+ "version" : "4.200000"
}
],
"zilla" : {
@@ -234,7 +234,7 @@
"config" : {
"is_trial" : 0
},
- "version" : "4.102342"
+ "version" : "4.200000"
}
}
}
Modified: branches/upstream/libmoosex-nonmoose-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-nonmoose-perl/current/META.yml?rev=69826&op=diff
==============================================================================
--- branches/upstream/libmoosex-nonmoose-perl/current/META.yml (original)
+++ branches/upstream/libmoosex-nonmoose-perl/current/META.yml Sun Feb 27 03:09:41 2011
@@ -7,7 +7,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.31
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.102342, CPAN::Meta::Converter version 2.101670'
+generated_by: 'Dist::Zilla version 4.200000, CPAN::Meta::Converter version 2.101670'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -18,73 +18,73 @@
Moose: 1.15
resources:
repository: git://github.com/doy/moosex-nonmoose.git
-version: 0.17
+version: 0.18
x_Dist_Zilla:
plugins:
-
class: Dist::Zilla::Plugin::GatherDir
name: '@DOY/GatherDir'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@DOY/PruneCruft'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@DOY/ManifestSkip'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@DOY/MetaYAML'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::License
name: '@DOY/License'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::Readme
name: '@DOY/Readme'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::ExtraTests
name: '@DOY/ExtraTests'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::ExecDir
name: '@DOY/ExecDir'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::ShareDir
name: '@DOY/ShareDir'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::MakeMaker
name: '@DOY/MakeMaker'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::Manifest
name: '@DOY/Manifest'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::TestRelease
name: '@DOY/TestRelease'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@DOY/ConfirmRelease'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@DOY/MetaConfig'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@DOY/MetaJSON'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::NextRelease
name: '@DOY/NextRelease'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::CheckChangesHasContent
name: '@DOY/CheckChangesHasContent'
@@ -92,15 +92,15 @@
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@DOY/PkgVersion'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::PodCoverageTests
name: '@DOY/PodCoverageTests'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@DOY/PodSyntaxTests'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::NoTabsTests
name: '@DOY/NoTabsTests'
@@ -120,11 +120,11 @@
-
class: Dist::Zilla::Plugin::Git::Check
name: '@DOY/Git::Check'
- version: 1.102010
+ version: 1.103520
-
class: Dist::Zilla::Plugin::Git::Tag
name: '@DOY/Git::Tag'
- version: 1.102010
+ version: 1.103520
-
class: Dist::Zilla::Plugin::BumpVersionFromGit
name: '@DOY/BumpVersionFromGit'
@@ -136,7 +136,7 @@
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@DOY/UploadToCPAN'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -144,7 +144,7 @@
phase: runtime
type: requires
name: Prereqs
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -152,25 +152,25 @@
phase: test
type: requires
name: TestRequires
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: 4.102342
+ version: 4.200000
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: 4.102342
+ version: 4.200000
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: 0
- version: 4.102342
+ version: 4.200000
Modified: branches/upstream/libmoosex-nonmoose-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-nonmoose-perl/current/Makefile.PL?rev=69826&op=diff
==============================================================================
--- branches/upstream/libmoosex-nonmoose-perl/current/Makefile.PL (original)
+++ branches/upstream/libmoosex-nonmoose-perl/current/Makefile.PL Sun Feb 27 03:09:41 2011
@@ -25,7 +25,7 @@
'List::MoreUtils' => '0',
'Moose' => '1.15'
},
- 'VERSION' => '0.17',
+ 'VERSION' => '0.18',
'test' => {
'TESTS' => 't/*.t'
}
Modified: branches/upstream/libmoosex-nonmoose-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-nonmoose-perl/current/README?rev=69826&op=diff
==============================================================================
--- branches/upstream/libmoosex-nonmoose-perl/current/README (original)
+++ branches/upstream/libmoosex-nonmoose-perl/current/README Sun Feb 27 03:09:41 2011
@@ -1,11 +1,11 @@
This archive contains the distribution MooseX-NonMoose,
-version 0.17:
+version 0.18:
easy subclassing of non-Moose classes
-This software is copyright (c) 2010 by Jesse Luehrs.
+This software is copyright (c) 2011 by Jesse Luehrs.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
Modified: branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose.pm?rev=69826&op=diff
==============================================================================
--- branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose.pm (original)
+++ branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose.pm Sun Feb 27 03:09:41 2011
@@ -1,6 +1,6 @@
package MooseX::NonMoose;
BEGIN {
- $MooseX::NonMoose::VERSION = '0.17';
+ $MooseX::NonMoose::VERSION = '0.18';
}
use Moose::Exporter;
# ABSTRACT: easy subclassing of non-Moose classes
@@ -35,7 +35,7 @@
=head1 VERSION
-version 0.17
+version 0.18
=head1 SYNOPSIS
@@ -105,7 +105,7 @@
=back
-=head1 CAVEATS
+=head1 BUGS/CAVEATS
=over 4
@@ -128,15 +128,11 @@
=back
-=for Pod::Coverage init_meta
-
-=head1 BUGS
-
-No known bugs.
-
Please report any bugs through RT: email
C<bug-moosex-nonmoose at rt.cpan.org>, or browse to
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooseX-NonMoose>.
+
+=for Pod::Coverage init_meta
=head1 SEE ALSO
@@ -185,7 +181,7 @@
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2010 by Jesse Luehrs.
+This software is copyright (c) 2011 by Jesse Luehrs.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
Modified: branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose/InsideOut.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose/InsideOut.pm?rev=69826&op=diff
==============================================================================
--- branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose/InsideOut.pm (original)
+++ branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose/InsideOut.pm Sun Feb 27 03:09:41 2011
@@ -1,6 +1,6 @@
package MooseX::NonMoose::InsideOut;
BEGIN {
- $MooseX::NonMoose::InsideOut::VERSION = '0.17';
+ $MooseX::NonMoose::InsideOut::VERSION = '0.18';
}
use Moose::Exporter;
# ABSTRACT: easy subclassing of non-Moose non-hashref classes
@@ -36,7 +36,7 @@
=head1 VERSION
-version 0.17
+version 0.18
=head1 SYNOPSIS
@@ -75,7 +75,7 @@
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2010 by Jesse Luehrs.
+This software is copyright (c) 2011 by Jesse Luehrs.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
Modified: branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose/Meta/Role/Class.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose/Meta/Role/Class.pm?rev=69826&op=diff
==============================================================================
--- branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose/Meta/Role/Class.pm (original)
+++ branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose/Meta/Role/Class.pm Sun Feb 27 03:09:41 2011
@@ -1,6 +1,6 @@
package MooseX::NonMoose::Meta::Role::Class;
BEGIN {
- $MooseX::NonMoose::Meta::Role::Class::VERSION = '0.17';
+ $MooseX::NonMoose::Meta::Role::Class::VERSION = '0.18';
}
use Moose::Role;
use List::MoreUtils qw(any);
@@ -202,6 +202,72 @@
return @ret;
};
+sub _generate_fallback_constructor {
+ my $self = shift;
+ my ($class_var) = @_;
+
+ my $new = $self->constructor_name;
+ my $super_new_class = $self->_find_next_nonmoose_constructor_package;
+ my $arglist = $self->find_method_by_name('FOREIGNBUILDARGS')
+ ? "${class_var}->FOREIGNBUILDARGS(\@_)"
+ : '@_';
+ my $instance = "${class_var}->${super_new_class}::$new($arglist)";
+ # XXX: the "my $__DUMMY = " part is because "return do" triggers a weird
+ # bug in pre-5.12 perls (it ends up returning undef)
+ return '(my $__DUMMY = do { '
+ . 'if (ref($_[0]) eq \'HASH\') { '
+ . '$_[0]->{__INSTANCE__} = ' . $instance . ' '
+ . 'unless exists $_[0]->{__INSTANCE__}; '
+ . '} '
+ . 'else { '
+ . 'unshift @_, __INSTANCE__ => ' . $instance . '; '
+ . '} '
+ . $class_var . '->Moose::Object::new(@_); '
+ . '})';
+}
+
+sub _inline_generate_instance {
+ my $self = shift;
+ my ($var, $class_var) = @_;
+
+ my $new = $self->constructor_name;
+ my $super_new_class = $self->_find_next_nonmoose_constructor_package;
+ my $arglist = $self->find_method_by_name('FOREIGNBUILDARGS')
+ ? "${class_var}->FOREIGNBUILDARGS(\@_)"
+ : '@_';
+ my $instance = "${class_var}->${super_new_class}::$new($arglist)";
+ return (
+ 'my ' . $var . ' = ' . $instance . ';',
+ 'if (!Scalar::Util::blessed(' . $var . ')) {',
+ $self->_inline_throw_error(
+ '"The constructor for ' . $super_new_class . ' did not return a blessed instance"',
+ ) . ';',
+ '}',
+ 'elsif (!' . $var . '->isa(' . $class_var . ')) {',
+ 'if (!' . $class_var . '->isa(Scalar::Util::blessed(' . $var . '))) {',
+ $self->_inline_throw_error(
+ '"The constructor for ' . $super_new_class . ' returned an object whose class is not a parent of ' . $class_var . '"',
+ ) . ';',
+ '}',
+ 'else {',
+ $self->_inline_rebless_instance($var, $class_var) . ';',
+ '}',
+ '}',
+ );
+}
+
+sub _find_next_nonmoose_constructor_package {
+ my $self = shift;
+ my $new = $self->constructor_name;
+ for my $method (map { $_->{code} } $self->find_all_methods_by_name($new)) {
+ next if $method->associated_metaclass->meta->can('does_role')
+ && $method->associated_metaclass->meta->does_role('MooseX::NonMoose::Meta::Role::Class');
+ return $method->package_name;
+ }
+ # this should never happen (it should find Moose::Object at least)
+ $self->throw_error("Couldn't find a non-Moose constructor for " . $self->name);
+}
+
no Moose::Role;
1;
@@ -215,7 +281,7 @@
=head1 VERSION
-version 0.17
+version 0.18
=head1 SYNOPSIS
@@ -252,7 +318,7 @@
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2010 by Jesse Luehrs.
+This software is copyright (c) 2011 by Jesse Luehrs.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
Modified: branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose/Meta/Role/Constructor.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose/Meta/Role/Constructor.pm?rev=69826&op=diff
==============================================================================
--- branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose/Meta/Role/Constructor.pm (original)
+++ branches/upstream/libmoosex-nonmoose-perl/current/lib/MooseX/NonMoose/Meta/Role/Constructor.pm Sun Feb 27 03:09:41 2011
@@ -1,6 +1,6 @@
package MooseX::NonMoose::Meta::Role::Constructor;
BEGIN {
- $MooseX::NonMoose::Meta::Role::Constructor::VERSION = '0.17';
+ $MooseX::NonMoose::Meta::Role::Constructor::VERSION = '0.18';
}
use Moose::Role;
# ABSTRACT: constructor method trait for L<MooseX::NonMoose>
@@ -21,25 +21,13 @@
return $self->$orig(@_);
};
-sub _find_next_nonmoose_constructor_package {
- my $self = shift;
- my $new = $self->name;
- my $meta = $self->associated_metaclass;
- for my $method (map { $_->{code} } $meta->find_all_methods_by_name($new)) {
- next if $method->associated_metaclass->meta->can('does_role')
- && $method->associated_metaclass->meta->does_role('MooseX::NonMoose::Meta::Role::Class');
- return $method->package_name;
- }
- # this should never happen (it should find Moose::Object at least)
- $meta->throw_error("Couldn't find a non-Moose constructor for " . $meta->name);
-}
-
+# for Moose 1.21 compatibility
sub _generate_fallback_constructor {
my $self = shift;
my ($class_var) = @_;
my $new = $self->name;
my $meta = $self->associated_metaclass;
- my $super_new_class = $self->_find_next_nonmoose_constructor_package;
+ my $super_new_class = $meta->_find_next_nonmoose_constructor_package;
my $arglist = $meta->find_method_by_name('FOREIGNBUILDARGS')
? "${class_var}->FOREIGNBUILDARGS(\@_)"
: '@_';
@@ -58,12 +46,13 @@
. "}";
}
+# for Moose 1.21 compatibility
sub _generate_instance {
my $self = shift;
my ($var, $class_var) = @_;
my $new = $self->name;
my $meta = $self->associated_metaclass;
- my $super_new_class = $self->_find_next_nonmoose_constructor_package;
+ my $super_new_class = $meta->_find_next_nonmoose_constructor_package;
my $arglist = $meta->find_method_by_name('FOREIGNBUILDARGS')
? "${class_var}->FOREIGNBUILDARGS(\@_)"
: '@_';
@@ -99,7 +88,7 @@
=head1 VERSION
-version 0.17
+version 0.18
=head1 SYNOPSIS
@@ -134,7 +123,7 @@
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2010 by Jesse Luehrs.
+This software is copyright (c) 2011 by Jesse Luehrs.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
Modified: branches/upstream/libmoosex-nonmoose-perl/current/weaver.ini
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-nonmoose-perl/current/weaver.ini?rev=69826&op=diff
==============================================================================
--- branches/upstream/libmoosex-nonmoose-perl/current/weaver.ini (original)
+++ branches/upstream/libmoosex-nonmoose-perl/current/weaver.ini Sun Feb 27 03:09:41 2011
@@ -22,16 +22,12 @@
[Region / postlude]
-[Template / BUGS]
-template = ~/.dzil/pod_templates/bugs.section
-main_module_only = 1
+[Generic / BUGS]
[Generic / SEEALSO]
header = SEE ALSO
-[Template / SUPPORT]
-template = ~/.dzil/pod_templates/support.section
-main_module_only = 1
+[Generic / SUPPORT]
[Authors]
[Legal]
More information about the Pkg-perl-cvs-commits
mailing list