Skip Menu |
 

This queue is for tickets about the App-Software-License CPAN distribution.

Report information
The Basics
Id: 92459
Status: resolved
Priority: 0/
Queue: App-Software-License

People
Owner: ether [...] cpan.org
Requestors: RWSTAUNER [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.02

Attachments


Subject: Class::MOP::load_class is deprecated
Download (untitled) / with headers
text/plain 232b
Moose now uses Module::Runtime. The attached patch removes the warning and adds a basic test for ensuring the class works. P.S. If you like I'd be happy to accept co-maint and merge this and the other patch and make a new release.
Subject: module-runtime-for-load-class.patch
diff --git a/Makefile.PL b/Makefile.PL index fd2abb1..59963b8 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -21,5 +21,6 @@ WriteMakefile( "Software::License" => '0', "File::Spec::Functions" => '0', "Moose" => '0', + "Module::Runtime" => '0', }, ); diff --git a/lib/App/Software/License.pm b/lib/App/Software/License.pm index de9e9fc..65c9c03 100644 --- a/lib/App/Software/License.pm +++ b/lib/App/Software/License.pm @@ -7,6 +7,7 @@ use Moose; use MooseX::Types::Moose qw/Str Num Maybe/; use File::HomeDir; use File::Spec::Functions qw/catfile/; +use Module::Runtime (); use namespace::clean -except => 'meta'; @@ -61,7 +62,7 @@ has _software_license => ( sub _build__software_license { my ($self) = @_; my $class = "Software::License::${\$self->license}"; - Class::MOP::load_class($class); + Module::Runtime::require_module($class); return $class->new({ holder => $self->holder, year => $self->year, diff --git a/t/basic.t b/t/basic.t new file mode 100644 index 0000000..81c02ea --- /dev/null +++ b/t/basic.t @@ -0,0 +1,19 @@ +use strict; +use warnings; +use Test::More tests => 1; + +use App::Software::License; + +# Make this a no-op to avoid checking the file system. +App::Software::License->meta->make_mutable; +App::Software::License->meta->add_around_method_modifier( + get_config_from_file => sub {}, +); +App::Software::License->meta->make_immutable; + +local @ARGV = ('--holder=FooBar'); + +my $app = App::Software::License->new_with_options; + +like $app->notice, qr/^\QThis software is Copyright (c)\E/i, + 'Copyright notice generated';
hey, how'd we miss this one? :( thanks for the patch; a release will be coming this weekend!
Download (untitled) / with headers
text/plain 311b
On Sat Jan 25 10:48:43 2014, ETHER wrote: Show quoted text
> hey, how'd we miss this one? :( > > thanks for the patch; a release will be coming this weekend!
Thanks! Will you update the metadata to point to the repository location, please? And how about the year patch from https://rt.cpan.org/Ticket/Display.html?id=82924 ?
0.02 making its way to PAUSE now!


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.