diff options
author | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2007-11-13 21:43:36 +0000 |
---|---|---|
committer | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2007-11-13 21:43:36 +0000 |
commit | 89939ff9e89dbee9a8e4e7b8a5614f1fff0a74ae (patch) | |
tree | 3c34547fc126c6f6f0f8d078ba5d100bad42d74a /lib/Reaction/InterfaceModel/Reflector/DBIC.pm | |
parent | cb52a02e82517266f669680fc67f6df2f6193bdb (diff) | |
download | reaction-89939ff9e89dbee9a8e4e7b8a5614f1fff0a74ae.tar.gz reaction-89939ff9e89dbee9a8e4e7b8a5614f1fff0a74ae.zip |
changes so far for new moose / mop
Diffstat (limited to 'lib/Reaction/InterfaceModel/Reflector/DBIC.pm')
-rw-r--r-- | lib/Reaction/InterfaceModel/Reflector/DBIC.pm | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/Reaction/InterfaceModel/Reflector/DBIC.pm b/lib/Reaction/InterfaceModel/Reflector/DBIC.pm index 7e81b10..8df719b 100644 --- a/lib/Reaction/InterfaceModel/Reflector/DBIC.pm +++ b/lib/Reaction/InterfaceModel/Reflector/DBIC.pm @@ -29,20 +29,20 @@ class DBIC, which { has builtin_object_actions => (isa => "HashRef", is => "rw", lazy_build => 1); has builtin_collection_actions => (isa => "HashRef", is => "rw", lazy_build => 1); - implements build_object_actions => as { {} }; - implements build_collection_actions => as { {} }; + implements _build_object_actions => as { {} }; + implements _build_collection_actions => as { {} }; - implements build_default_object_actions => as { [ qw/Update Delete/ ] }; - implements build_default_collection_actions => as { [ qw/Create DeleteAll/ ] }; + implements _build_default_object_actions => as { [ qw/Update Delete/ ] }; + implements _build_default_collection_actions => as { [ qw/Create DeleteAll/ ] }; - implements build_builtin_object_actions => as { + implements _build_builtin_object_actions => as { { Update => { name => 'Update', base => Update }, Delete => { name => 'Delete', base => Delete, attributes => [] }, }; }; - implements build_builtin_collection_actions => as { + implements _build_builtin_collection_actions => as { { Create => {name => 'Create', base => Create }, DeleteAll => {name => 'DeleteAll', base => DeleteAll, attributes => [] } @@ -50,7 +50,7 @@ class DBIC, which { }; implements _all_object_actions => as { - my $self = shift; + my $self = shift; return $self->merge_hashes ($self->builtin_object_actions, $self->object_actions); }; @@ -161,7 +161,7 @@ class DBIC, which { unless($model && $schema); Class::MOP::load_class( $base ); Class::MOP::load_class( $schema ); - my $meta = eval {Class::MOP::load_class($model); } ? + my $meta = eval { Class::MOP::load_class($model); } ? $model->meta : $base->meta->create($model, superclasses => [ $base ]); # sources => undef, #default to qr/./ @@ -380,7 +380,7 @@ class DBIC, which { my $make_immutable = $meta->is_immutable || $self->make_classes_immutable;; $meta->make_mutable if $meta->is_immutable; - $meta->add_method(_build_im_class => sub{ $object } ); + $meta->add_method(_build__im_class => sub{ $object } ); #XXX as a default pass the domain model as a target_model until i come up with something #better through the coercion method my $def_act_args = sub { @@ -844,6 +844,7 @@ class DBIC, which { }; } #use Data::Dumper; + #print STDERR "\n" .$attr_name ." - ". $object . "\n"; #print STDERR Dumper(\%attr_opts); return \%attr_opts; }; |