Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19496/lib/OpenInteract2
Modified Files:
Action.pm
Log Message:
add add_status_key() and add_error_key() shortcuts
Index: Action.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action.pm,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** Action.pm 28 Nov 2004 04:24:42 -0000 1.62
--- Action.pm 1 Dec 2004 05:27:07 -0000 1.63
***************
*** 930,933 ****
--- 930,946 ----
}
+
+ # shortcuts...
+
+ sub add_error_key {
+ my ( $self, $key, @params ) = @_;
+ $self->param_add( error_msg => $self->_msg( $key, @params ) );
+ }
+
+ sub add_status_key {
+ my ( $self, $key, @params ) = @_;
+ $self->param_add( status_msg => $self->_msg( $key, @params ) );
+ }
+
# confusing name -- the title would suggest we want the message key
# first, but we want to also pass along optional arguments to the
***************
*** 2551,2554 ****
--- 2564,2581 ----
Returns: nothing
+ B<add_error_key( $key, [ @msg_params ] )>
+
+ Adds error message (under param name 'error_msg') using the resource
+ key C<$key> which may also optionally need C<@msg_params>.
+
+ Returns: added message
+
+ B<add_status_key( $key, [ @msg_params ] )>
+
+ Adds status message (under param name 'status_msg') using the resource
+ key C<$key> which may also optionally need C<@msg_params>.
+
+ Returns: added message
+
B<message_from_key_or_param( $param_name, $message_key, @key_arguments )>
|