in reply to Re: Re: Re: Here's a quick example why not to use Indirect notation
in thread Perl High School

In addition, if you mistype the name, so say you do something like:
package Foo; sub new { return bless {}, shift; } -------- use Foo; my $bar = new FOO();
You get an error saying that main::FOO() could not be found. That's not a good error.

Direct notation is put there for a purpose. I think that indirect notation was a bad idea all around, put in to pander to another community that looks down on Perl usage to begin with. *shrugs*

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

  • Comment on Re: Re: Re: Re: Here's a quick example why not to use Indirect notation
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Here's a quick example why not to use Indirect notation
by dws (Chancellor) on Feb 22, 2002 at 21:13 UTC
    In addition, if you mistype the name ... you get an error saying that main::FOO() could not be found. That's not a good error.

    That's a rare problem (depending on one's typing skills) that takes, what, about 30 seconds to resolve?