Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12503/lib/OpenInteract2
Modified Files:
Action.pm
Log Message:
OIN-47: expose an Action's package by a property (it's always been set in the action table at server startup)
Index: Action.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action.pm,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** Action.pm 26 Sep 2004 23:51:47 -0000 1.54
--- Action.pm 27 Sep 2004 05:01:56 -0000 1.55
***************
*** 31,35 ****
my %PROPS = map { $_ => 1 } qw(
! controller content_generator
action_type class method message_name
task task_default task_valid task_invalid
--- 31,35 ----
my %PROPS = map { $_ => 1 } qw(
! controller content_generator package_name
action_type class method message_name
task task_default task_valid task_invalid
***************
*** 742,745 ****
--- 742,754 ----
}
+ # read-only
+
+ sub package {
+ my ( $self ) = @_;
+ my $package_name = $self->package_name;
+ return undef unless ( $package_name );
+ return CTX->repository->fetch_package( $package_name );
+ }
+
# Assign the object properties from the params passed in; the rest of
# the parameters are instance parameters that we won't know in
|