Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/lib/WebGUI/Asset/Shortcut.pm b/lib/WebGUI/Asset/Shortcut.pm
index 005bf3d..db4337a 100644
--- a/lib/WebGUI/Asset/Shortcut.pm
+++ b/lib/WebGUI/Asset/Shortcut.pm
@@ -22,10 +22,9 @@ define icon => 'shortcut.gif';
define tableName => 'Shortcut';
property shortcutToAssetId => (
- noFormPost => 1,
- fieldType => "hidden",
default => undef,
noFormPost => 1,
+ fieldType => 'hidden',
);
property shortcutByCriteria => (
fieldType => "yesNo",
diff --git a/lib/WebGUI/Definition.pm b/lib/WebGUI/Definition.pm
index a53870c..32768ce 100644
--- a/lib/WebGUI/Definition.pm
+++ b/lib/WebGUI/Definition.pm
@@ -77,14 +77,12 @@ sub init_meta {
Moose->init_meta(%args);
Moose::Util::MetaRole::apply_base_class_roles(
- for => $args{for_class},
- roles => [ 'WebGUI::Definition::Role::Object' ],
+ for_class => $args{for_class},
+ roles => [ 'WebGUI::Definition::Role::Object' ],
);
- Moose::Util::MetaRole::apply_metaroles(
- for => $args{for_class},
- class_metaroles => {
- class => ['WebGUI::Definition::Meta::Class'],
- },
+ Moose::Util::MetaRole::apply_metaclass_roles(
+ for_class => $args{for_class},
+ metaclass_roles => [ 'WebGUI::Definition::Meta::Class', ],
);
return $args{for_class}->meta;
}
diff --git a/lib/WebGUI/Definition/Asset.pm b/lib/WebGUI/Definition/Asset.pm
index 3f1d8d6..92a3b55 100644
--- a/lib/WebGUI/Definition/Asset.pm
+++ b/lib/WebGUI/Definition/Asset.pm
@@ -80,14 +80,12 @@ sub init_meta {
WebGUI::Definition->init_meta(%args);
Moose::Util::MetaRole::apply_base_class_roles(
- for => $args{for_class},
+ for_class => $args{for_class},
roles => [ 'WebGUI::Definition::Role::Asset' ],
);
- Moose::Util::MetaRole::apply_metaroles(
- for => $args{for_class},
- class_metaroles => {
- class => ['WebGUI::Definition::Meta::Asset'],
- },
+ Moose::Util::MetaRole::apply_metaclass_roles(
+ for_class => $args{for_class},
+ metaclass_roles => ['WebGUI::Definition::Meta::Asset', ],
);
return $args{for_class}->meta;
}
diff --git a/lib/WebGUI/Definition/Meta/Asset.pm b/lib/WebGUI/Definition/Meta/Asset.pm
index ff7b8de..6cee461 100644
--- a/lib/WebGUI/Definition/Meta/Asset.pm
+++ b/lib/WebGUI/Definition/Meta/Asset.pm
@@ -51,7 +51,6 @@ for properties.
=cut
has '+property_metaroles' => (
- is => 'ro',
default => sub { [ 'WebGUI::Definition::Meta::Property', 'WebGUI::Definition::Meta::Property::Asset'] },
);
diff --git a/lib/WebGUI/Definition/Meta/Class.pm b/lib/WebGUI/Definition/Meta/Class.pm
index 1245a89..bf63377 100644
--- a/lib/WebGUI/Definition/Meta/Class.pm
+++ b/lib/WebGUI/Definition/Meta/Class.pm
@@ -55,9 +55,9 @@ sub add_property {
}
my %form_options;
my $prop_meta_roles = $self->property_metaroles;
- my $prop_meta = $self->_property_metaclass;
+ my $prop_meta = $self->_property_metaclass;
for my $key ( keys %options ) {
- if ( ! $prop_meta->meta->find_attribute_by_name($key) ) {
+ if ( ! $prop_meta->find_attribute_by_name($key) ) {
$form_options{$key} = delete $options{$key};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.