On Thu, 23 May 2002, Valerio_Valdez Paolini wrote:

> I would change this that way:
>
>       sub some_run_mode
>       {
>               # eventually
>               # $self->append_content('...');
>               $self->run_mode('named_run_mode');
>               return;
>       }

I don't see an advantage over:

  return $self->named_run_mode()

If you have the run-mode name in a variable you can do:

  my $run_mode = "foo";
  return $self->$run_mode();

And the code will call foo().  Isn't Perl great?

-sam


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@lists.vm.com/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to