Skip to content

Commit ffcee04

Browse files
committedJun 8, 2012
Allow WebGUI::Fork's to be built for asset specific methods, and not only those found in WebGUI::Asset's namespace.

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed
 

‎lib/WebGUI/Asset.pm

+11-2
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ following arguments are required in $args:
849849
850850
=head3 method
851851
852-
The name of the WebGUI::Asset method to call
852+
The name of the asset method to call
853853
854854
=head3 args
855855
@@ -867,13 +867,22 @@ An key in Asset's i18n hash for the title of the rendered console page
867867
868868
The full url to redirect to after the fork has finished.
869869
870+
=head3 className
871+
872+
The class to call C<method> in, as in
873+
874+
$className->$method
875+
876+
defaults to the current Asset's classname if left blank.
877+
870878
=cut
871879

872880
sub forkWithStatusPage {
873881
my ( $self, $args ) = @_;
874882
my $session = $self->session;
875883

876-
my $process = WebGUI::Fork->start( $session, 'WebGUI::Asset', $args->{method}, $args->{args} );
884+
my $className = $args->{className} || $self->get('className');
885+
my $process = WebGUI::Fork->start( $session, $className, $args->{method}, $args->{args} );
877886

878887
if ( my $groupId = $args->{groupId} ) {
879888
$process->setGroup($groupId);

0 commit comments

Comments
 (0)
Please sign in to comment.