aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorphaylon <phaylon@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-06-29 16:28:01 +0000
committerphaylon <phaylon@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-06-29 16:28:01 +0000
commit65b88951ac01b54d83a9d2c5b27c276e31b839fd (patch)
tree7452cd1a56772086f94965453f226b02a0753ac7 /lib
parenta8b77e2a473eec7c5888c107f2c127718cb56692 (diff)
downloadreaction-65b88951ac01b54d83a9d2c5b27c276e31b839fd.tar.gz
reaction-65b88951ac01b54d83a9d2c5b27c276e31b839fd.zip
changed search api to less magic but working version
Diffstat (limited to 'lib')
-rw-r--r--lib/Reaction/InterfaceModel/Action/Search/UpdateSpec.pm35
1 files changed, 27 insertions, 8 deletions
diff --git a/lib/Reaction/InterfaceModel/Action/Search/UpdateSpec.pm b/lib/Reaction/InterfaceModel/Action/Search/UpdateSpec.pm
index 070b9df..cec863d 100644
--- a/lib/Reaction/InterfaceModel/Action/Search/UpdateSpec.pm
+++ b/lib/Reaction/InterfaceModel/Action/Search/UpdateSpec.pm
@@ -10,18 +10,37 @@ use namespace::clean -except => 'meta';
extends 'Reaction::InterfaceModel::Action';
-my %ReflectionCache;
-
-method build_reflected_search_spec () {
- confess sprintf "Class %s did not override the build_reflected_search_spec method", ref($self) || $self;
-}
-
method _reflection_info () {
- $ReflectionCache{ ref($self) || $self }
- ||= reflect_attributes_from_target $self->build_reflected_search_spec;
+ confess sprintf "Class %s did not override the _reflection_info method",
+ ref($self) || $self;
}
with 'Reaction::InterfaceModel::Search::UpdateSpec';
1;
+=head1 NAME
+
+Reaction::InterfaceModel::Action::Search::UpdateSpec - Update search specification
+
+=head1 SYNOPSIS
+
+ package MyApp::InterfaceModel::UpdateSearchSpec;
+ use Reaction::Class;
+ use Reaction::InterfaceModel::Reflector::SearchSpec;
+
+ use aliased 'MyApp::InterfaceModel::SearchSpec';
+
+ use namespace::autoclean;
+
+ extends 'Reaction::InterfaceModel::Action::Search::UpdateSpec';
+
+ # this will reflect the search spec as update spec in the current
+ # class.
+ my $info = reflect_attributes_from_target SearchSpec;
+
+ sub _reflection_info { $info }
+
+ 1;
+
+=cut