Skip Menu |

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

Report information
The Basics
Id: 90974
Status: open
Priority: 0/
Queue: App-TemplateServer

People
Owner: Nobody in particular
Requestors: upasna.shukla [...] gmail.com
cpan [...] zoffix.com
Cc:
AdminCc:

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



Subject: New Moose may break your code
Date: Fri, 29 Nov 2013 03:39:22 +0530
To: bug-App-TemplateServer [...] rt.cpan.org
From: "Upasana Shukla" <upasna.shukla [...] gmail.com>
We recently deprecated Class::MOP::load_class in Moose. It appears that your module is affected. You can read more about the change here: https://metacpan.org/pod/release/ETHER/Moose-2.1106-TRIAL/lib/Moose/Manual/Delta.pod#pod2.1200 We recommend that you take a look at your code to see if it indeed does need to be updated with respect to the latest Moose release, 2.1106-TRIAL. If you have any questions, then please ask either on Moose mailing list : http://lists.perl.org/list/moose.html or on #moose & #moose-dev on irc.perl.org.
Attached patch fixes the issue. -- Cheers, ZZ [ https://metacpan.org/author/ZOFFIX ]
Subject: App-TemplateServer-0.04.patch
diff -Naur App-TemplateServer-0.04_orig/lib/App/TemplateServer.pm App-TemplateServer-0.04/lib/App/TemplateServer.pm --- App-TemplateServer-0.04_orig/lib/App/TemplateServer.pm 2014-01-24 20:46:18.145562461 -0500 +++ App-TemplateServer-0.04/lib/App/TemplateServer.pm 2014-01-24 20:46:42.885562786 -0500 @@ -5,6 +5,7 @@ use Moose; use Moose::Util::TypeConstraints; use MooseX::Types::Path::Class qw(File); +use Class::Load; use HTTP::Daemon; use HTTP::Headers; @@ -88,7 +89,7 @@ my $loaded; for ($_, "App::TemplateServer::Provider::$_"){ eval { - if(Class::MOP::load_class($_)){ + if(Class::Load::load_class($_)){ return $loaded = $_; } } and last; diff -Naur App-TemplateServer-0.04_orig/Makefile.PL App-TemplateServer-0.04/Makefile.PL --- App-TemplateServer-0.04_orig/Makefile.PL 2014-01-24 20:46:18.145562461 -0500 +++ App-TemplateServer-0.04/Makefile.PL 2014-01-24 20:47:12.081563168 -0500 @@ -17,6 +17,7 @@ requires 'Template'; requires 'URI::Escape'; requires 'YAML::Syck'; +requires 'Class::Load' => '0.20'; build_requires 'Data::Dumper'; build_requires 'Directory::Scratch'; build_requires 'Test::More'; diff -Naur App-TemplateServer-0.04_orig/t/synopsis.t App-TemplateServer-0.04/t/synopsis.t --- App-TemplateServer-0.04_orig/t/synopsis.t 2014-01-24 20:46:18.145562461 -0500 +++ App-TemplateServer-0.04/t/synopsis.t 2014-01-24 20:46:57.453562976 -0500 @@ -3,7 +3,7 @@ use Test::More tests => 13; use App::TemplateServer; use YAML::Syck; -use Class::MOP; +use Class::Load; use HTTP::Request; { @@ -15,7 +15,7 @@ sub render_template { Dumper($_[2]->data) } } -ok eval { Class::MOP::load_class('TestProvider') }, 'TestProvider loaded'; +ok eval { Class::Load::load_class('TestProvider') }, 'TestProvider loaded'; my $data = Load(do { local $/; <DATA> }); ok $data, 'data loaded';