Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Dev

modperl_style.pod

 

 

ModPerl dev RSS feed   Index | Next | Previous | View Threaded


stas at stason

Apr 25, 2001, 1:30 AM

Post #1 of 3 (838 views)
Permalink
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[at]stason.org http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




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


chris at sixlegs

Apr 25, 2001, 8:27 AM

Post #2 of 3 (815 views)
Permalink
Re: modperl_style.pod [In reply to]

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[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org


dougm at covalent

Apr 25, 2001, 8:27 AM

Post #3 of 3 (816 views)
Permalink
Re: modperl_style.pod [In reply to]

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[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org

ModPerl dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.