Skip Menu |

This queue is for tickets about the Data-Pipeline CPAN distribution.

Report information
The Basics
Id: 90902
Status: open
Priority: 0/
Queue: Data-Pipeline

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:33:56 +0530
To: bug-Data-Pipeline [...] 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: Data-Pipeline-0.02.patch
diff -Naur Data-Pipeline-0.02_orig/lib/Data/Pipeline/Machine.pm Data-Pipeline-0.02/lib/Data/Pipeline/Machine.pm --- Data-Pipeline-0.02_orig/lib/Data/Pipeline/Machine.pm 2014-01-24 21:15:26.742549236 -0500 +++ Data-Pipeline-0.02/lib/Data/Pipeline/Machine.pm 2014-01-24 21:15:58.422549651 -0500 @@ -3,7 +3,7 @@ use Moose; use Sub::Exporter; use Sub::Name 'subname'; -use Class::MOP (); +use Class::Load (); use Carp (); use namespace::autoclean; @@ -17,8 +17,8 @@ use Data::Pipeline::Types qw(Iterator IteratorSource Aggregator IteratorOutput); BEGIN { - Class::MOP::load_class('Data::Pipeline::Aggregator::Machine'); - Class::MOP::load_class('Data::Pipeline::Aggregator::Pipeline'); + Class::Load::load_class('Data::Pipeline::Aggregator::Machine'); + Class::Load::load_class('Data::Pipeline::Aggregator::Pipeline'); } has _m => ( diff -Naur Data-Pipeline-0.02_orig/lib/Data/Pipeline/Parser.pm Data-Pipeline-0.02/lib/Data/Pipeline/Parser.pm --- Data-Pipeline-0.02_orig/lib/Data/Pipeline/Parser.pm 2014-01-24 21:15:26.742549236 -0500 +++ Data-Pipeline-0.02/lib/Data/Pipeline/Parser.pm 2014-01-24 21:16:18.746549918 -0500 @@ -4122,7 +4122,7 @@ use Carp; -use Class::MOP; +use Class::Load; use Data::Pipeline::Types qw(IteratorSource); use Data::Pipeline::Machine (); @@ -4492,7 +4492,7 @@ $class="Data::Pipeline::${p}::${filter}"; - return $class if eval { Class::MOP::load_class($class) }; + return $class if eval { Class::Load::load_class($class) }; } } diff -Naur Data-Pipeline-0.02_orig/lib/Data/Pipeline/Types.pm Data-Pipeline-0.02/lib/Data/Pipeline/Types.pm --- Data-Pipeline-0.02_orig/lib/Data/Pipeline/Types.pm 2014-01-24 21:15:26.742549236 -0500 +++ Data-Pipeline-0.02/lib/Data/Pipeline/Types.pm 2014-01-24 21:16:43.478550242 -0500 @@ -1,6 +1,6 @@ package Data::Pipeline::Types; -use Class::MOP; +use Class::Load; use MooseX::Types -declare => [qw( Iterator @@ -75,12 +75,12 @@ coerce Adapter, from ArrayRef, - via { Class::MOP::load_class("Data::Pipeline::Adapter::Array"); Data::Pipeline::Adapter::Array -> new( array => $_ ) } + via { Class::Load::load_class("Data::Pipeline::Adapter::Array"); Data::Pipeline::Adapter::Array -> new( array => $_ ) } ; coerce Adapter, from Str, - via { Class::MOP::load_class("Data::Pipeline::Adapter::Array"); Data::Pipeline::Adapter::Array -> new( array => [ $_ ] ) } + via { Class::Load::load_class("Data::Pipeline::Adapter::Array"); Data::Pipeline::Adapter::Array -> new( array => [ $_ ] ) } ; coerce IteratorSource, @@ -90,7 +90,7 @@ coerce IteratorSource, from Str, - via { Class::MOP::load_class("Data::Pipeline::Adapter::Array"); Data::Pipeline::Adapter::Array -> new( array => [ $_ ] ) -> source } + via { Class::Load::load_class("Data::Pipeline::Adapter::Array"); Data::Pipeline::Adapter::Array -> new( array => [ $_ ] ) -> source } ; coerce IteratorSource, @@ -100,7 +100,7 @@ coerce IteratorSource, from ArrayRef, - via { Class::MOP::load_class("Data::Pipeline::Adapter::Array"); Data::Pipeline::Adapter::Array -> new( array => $_ ) -> source } + via { Class::Load::load_class("Data::Pipeline::Adapter::Array"); Data::Pipeline::Adapter::Array -> new( array => $_ ) -> source } ; coerce IteratorSource, @@ -120,7 +120,7 @@ coerce Iterator, from IteratorSource, - via { Class::MOP::load_class("Data::Pipeline::Iterator"); Data::Pipeline::Iterator -> new( source => $_ ) } + via { Class::Load::load_class("Data::Pipeline::Iterator"); Data::Pipeline::Iterator -> new( source => $_ ) } ; coerce Iterator, @@ -130,7 +130,7 @@ coerce Iterator, from Adapter, - via { Class::MOP::load_class("Data::Pipeline::Iterator"); Data::Pipeline::Iterator -> new( source => $_ -> source ) } + via { Class::Load::load_class("Data::Pipeline::Iterator"); Data::Pipeline::Iterator -> new( source => $_ -> source ) } ; coerce Iterator, diff -Naur Data-Pipeline-0.02_orig/lib/Data/Pipeline.pm Data-Pipeline-0.02/lib/Data/Pipeline.pm --- Data-Pipeline-0.02_orig/lib/Data/Pipeline.pm 2014-01-24 21:15:26.742549236 -0500 +++ Data-Pipeline-0.02/lib/Data/Pipeline.pm 2014-01-24 21:17:09.710550585 -0500 @@ -4,7 +4,7 @@ use Sub::Exporter; use Sub::Name 'subname'; -use Class::MOP (); +use Class::Load (); use Carp (); use Data::Pipeline::Iterator; @@ -57,17 +57,17 @@ sub _find_class($) { my($type) = @_; - #return $type if eval { Class::MOP::load_class($type) }; + #return $type if eval { Class::Load::load_class($type) }; #my $class="Data::Pipeline::$type"; - #return $class if eval { Class::MOP::load_class($class) }; + #return $class if eval { Class::Load::load_class($class) }; for my $p (qw(Aggregator Adapter Action AggregatorX AdapterX ActionX)) { $class="Data::Pipeline::${p}::${type}"; - return $class if eval { Class::MOP::load_class($class) }; + return $class if eval { Class::Load::load_class($class) }; } Carp::croak "Unable to find an implementation for $type"; diff -Naur Data-Pipeline-0.02_orig/Makefile.PL Data-Pipeline-0.02/Makefile.PL --- Data-Pipeline-0.02_orig/Makefile.PL 2014-01-24 21:15:26.738549236 -0500 +++ Data-Pipeline-0.02/Makefile.PL 2014-01-24 21:17:41.526551002 -0500 @@ -4,6 +4,7 @@ all_from 'lib/Data/Pipeline.pm'; requires 'Moose' => 2.06; +requires 'Class::Load' => '0.20'; feature 'CSV Adapter' => ( 'Text::CSV' => 0, diff -Naur Data-Pipeline-0.02_orig/parser.PL Data-Pipeline-0.02/parser.PL --- Data-Pipeline-0.02_orig/parser.PL 2014-01-24 21:15:26.742549236 -0500 +++ Data-Pipeline-0.02/parser.PL 2014-01-24 21:17:25.046550786 -0500 @@ -822,7 +822,7 @@ use Carp; -use Class::MOP; +use Class::Load; use Data::Pipeline::Types qw(IteratorSource); use Data::Pipeline::Machine (); @@ -1192,7 +1192,7 @@ $class="Data::Pipeline::${p}::${filter}"; - return $class if eval { Class::MOP::load_class($class) }; + return $class if eval { Class::Load::load_class($class) }; } }