Skip to content

Commit

Permalink
Allow WebGUI::Fork's to be built for asset specific methods, and not …
Browse files Browse the repository at this point in the history
…only those found in WebGUI::Asset's namespace.
  • Loading branch information
perlDreamer committed Jun 8, 2012
1 parent 6e88016 commit ffcee04
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions lib/WebGUI/Asset.pm
Expand Up @@ -849,7 +849,7 @@ following arguments are required in $args:
=head3 method
The name of the WebGUI::Asset method to call
The name of the asset method to call
=head3 args
Expand All @@ -867,13 +867,22 @@ An key in Asset's i18n hash for the title of the rendered console page
The full url to redirect to after the fork has finished.
=head3 className
The class to call C<method> in, as in
$className->$method
defaults to the current Asset's classname if left blank.
=cut

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

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

if ( my $groupId = $args->{groupId} ) {
$process->setGroup($groupId);
Expand Down

0 comments on commit ffcee04

Please sign in to comment.