Permalink
Browse files

Fixes Class::MOP::load_class deprecation warnings

  • Loading branch information...
1 parent a9ac761 commit 57e39fb7d4f850265c6a9741cdd4a8e32dd37e24 @zoffixznet zoffixznet committed Jan 25, 2014
Showing with 6 additions and 5 deletions.
  1. +2 −1 lib/Form/Toolkit/Field.pm
  2. +2 −2 lib/Form/Toolkit/Form.pm
  3. +2 −2 lib/Form/Toolkit/Test.pm
@@ -1,4 +1,5 @@
package Form::Toolkit::Field;
+use Class::Load;
use Moose -traits => 'Form::Toolkit::Meta::Class::Trait::HasShortClass';
use Moose::Util qw/apply_all_roles/;
@@ -191,7 +192,7 @@ sub add_role{
## This is better, as apply can be used to add new arguments
## See http://search.cpan.org/~ether/Moose-2.0801/lib/Moose/Role.pm#APPLYING_ROLES
- Class::MOP::load_class( $role );
+ Class::Load::load_class( $role );
$role->meta->apply($self, rebless_params => $new_args );
## Maintain important meta attributes.
@@ -1,7 +1,7 @@
package Form::Toolkit::Form;
require 5.010_000;
use Moose -traits => 'Form::Toolkit::Meta::Class::Trait::HasID';
-use Class::MOP;
+use Class::Load;
use Form::Toolkit::Clerk::Hash;
@@ -158,7 +158,7 @@ sub add_field{
}else{
$f_class = 'Form::Toolkit::Field::'.$f_class;
}
- Class::MOP::load_class( $f_class );
+ Class::Load::load_class( $f_class );
my $new_instance = $f_class->new({ form => $self , name => $name });
$ret = $self->_add_field($new_instance);
};
@@ -1,6 +1,6 @@
package Form::Toolkit::Test;
use Moose;
-use Class::MOP;
+use Class::Load;
use Module::Pluggable::Object;
=head1 NAME
@@ -23,7 +23,7 @@ sub build_fields{
my @res = ();
my $mp = Module::Pluggable::Object->new( search_path => 'Form::Toolkit::Field' );
foreach my $field_class ( $mp->plugins() ){
- Class::MOP::load_class($field_class);
+ Class::Load::load_class($field_class);
$self->add_field('+'.$field_class , 'field_'.$field_class->meta->short_class() );
}

0 comments on commit 57e39fb

Please sign in to comment.