You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2001/04/25 10:30:02 UTC

modperl_style.pod

Doug, I have a few questions regarding modperl_style.pod

=head2 Inheritance

=over 4

=item Avoid inherting from certain modules

Exporter
To void inherting B<AutoLoader::AUTOLOAD>
...
----------

Does it mean: Avoid using Exporter to void...?

also shouldn't:

  *import = \&Exporter::import;
be:
  local *import = \&Exporter::import;

--------

also can you please explain why:

=head2 Symbol tables

...
stay away from main::

Thanks!



_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: modperl_style.pod

Posted by Chris Nokleberg <ch...@sixlegs.com>.
One reason is because when using Registry, your script isn't in main::
anymore. This bit me once in porting CGIs to mod_perl.

Chris

On Wed, Apr 25, 2001 at 04:30:02PM +0800, Stas Bekman wrote:
>
> also can you please explain why:
> 
> =head2 Symbol tables
> 
> ...
> stay away from main::

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: modperl_style.pod

Posted by Doug MacEachern <do...@covalent.net>.
On Wed, 25 Apr 2001, Stas Bekman wrote:

> Exporter
> To void inherting B<AutoLoader::AUTOLOAD>
> ...
> ----------
> 
> Does it mean: Avoid using Exporter to void...?

that was a typo, s/void/avoid/
 
> also shouldn't:
> 
>   *import = \&Exporter::import;
> be:
>   local *import = \&Exporter::import;

goodness no.  file-scope local is useless.
 
> --------
> 
> also can you please explain why:
> 
> =head2 Symbol tables
> 
> ...
> stay away from main::

same reason we have avoided it all these years.  avoid namespace clashes.




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org