Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: perlvars

by salvadors (Pilgrim)
on Jan 08, 2001 at 14:54 UTC ( [id://50469]=note: print w/replies, xml ) Need Help??


in reply to perlvars

Without commenting on the rest of the code, I thought I'd point out that this:

if($in{'go'} eq 'perldoc'){ use Pod::Html; } if($in{'file'} =~ /edit/ or /save/){ use HTML::Entities; } if( ($in{'rd'}) or ( ($in{'file'} eq 'save') && ($in{'filename'}) ) or ($in{'go'} eq ' url ')){ use FindBin qw($Bin); use File::Spec::Functions qw(rel2abs); } if($diag eq '1'){ use Data::Dumper; }
isn't doing what you think it's doing.

'use' happens at compile time, not run-time, so this fragment is actually just a wasteful way of doing:

use Pod::Html; use HTML::Entities; use FindBin qw($Bin); use File::Spec::Functions qw(rel2abs); use Data::Dumper; if($in{'go'} eq 'perldoc'){ # do nothing } if($in{'file'} =~ /edit/ or /save/){ # do nothing } if( ($in{'rd'}) or ( ($in{'file'} eq 'save') && ($in{'filename'}) ) or ($in{'go'} eq ' url ')){ # do nothing } if($diag eq '1'){ # do nothing }

HTH.

Tony

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://50469]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-24 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found