Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Conditional compile-time magic (RE: Checking to see if a particular Module is installed)

by tye (Sage)
on Aug 11, 2000 at 20:25 UTC ( [id://27533]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    BEGIN {
        my $code= '...some work-around for not having GD...';
    ...
        eval "sub mySub { $code }; 1 "
          or die "$@";
    }
    
  2. or download this
    package Pretend;
    use base qw(Exporter);
    ...
    sub sorter(&@);
    sub hahser(\%);
    #[...]
    
  3. or download this
    my $got_Pretend;
    BEGIN {
    ...
        } else {
            @list= sort \&comparer worse_hasher(\%hash);
        }
    
  4. or download this
        if(  $got_Pretend  ) {
            @list= sorter( sub { $_[0] <=> $_[1] }, &hasher(\%hash) );
        } else {
            @list= sort \&comparer worse_hasher(\%hash);
        }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-19 06:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found