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

Re^3: eval "require $class" seems wrong (--!$@)

by tye (Sage)
on Aug 22, 2007 at 19:05 UTC ( #634479=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    ( my $file= $class ) =~ s-::|'-/-g;
    if(  ! eval { require "$file.pm"; 1 }  ) {
        # work-around the failure here
    }
    
  2. or download this
    if(  ! eval "require $class; 1"  ) {
        # work-around the failure here
    }
    
  3. or download this
    eval "require $class; 1"
        or  die $@;
    
  4. or download this
    ( my $file= $class ) =~ s-::|'-/-g;
    require "$file.pm";
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2020-10-31 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (287 votes). Check out past polls.

    Notices?