[Bps-public-commit] r12469 - in Prophet/branches/moose: .
sartak at bestpractical.com
sartak at bestpractical.com
Sat May 17 07:10:58 EDT 2008
Author: sartak
Date: Sat May 17 07:10:56 2008
New Revision: 12469
Modified:
Prophet/branches/moose/ (props changed)
Prophet/branches/moose/lib/Prophet/ConflictingPropChange.pm
Log:
r56206 at onn: sartak | 2008-05-17 07:10:33 -0400
Moosify ConflictingPropChange
Modified: Prophet/branches/moose/lib/Prophet/ConflictingPropChange.pm
==============================================================================
--- Prophet/branches/moose/lib/Prophet/ConflictingPropChange.pm (original)
+++ Prophet/branches/moose/lib/Prophet/ConflictingPropChange.pm Sat May 17 07:10:56 2008
@@ -1,11 +1,22 @@
-
-use warnings;
-use strict;
-
package Prophet::ConflictingPropChange;
-use base qw/Class::Accessor/;
+use Moose;
-__PACKAGE__->mk_accessors(qw/name source_old_value target_value source_new_value/);
+has name => (
+ is => 'rw',
+ isa => 'Str',
+);
+
+has source_old_value => (
+ is => 'rw',
+);
+
+has target_value => (
+ is => 'rw',
+);
+
+has source_new_value => (
+ is => 'rw',
+);
=head1 NAME
@@ -39,11 +50,13 @@
my $self = shift;
my $hashref = {};
- for (qw(name source_old_value target_value source_new_value)) {
- $hashref->{$_} = $self->$_()
+ for ($self->meta->get_attribute_list) {
+ $hashref->{$_} = $self->$_
}
return $hashref;
}
+__PACKAGE__->meta->make_immutable;
+no Moose;
1;
More information about the Bps-public-commit
mailing list