Debug flag : Pragmas « Language Basics « Perl






Debug flag

   

#!/usr/bin/perl -s -w

use strict;
use vars '$debug';

use if $debug,             'File::Basename' => 'basename';
use if !$debug, autouse => 'File::Basename' => 'basename';

print "Before: ",join(",",keys %INC),"\n";
my $prog=basename($0);
print "After : ",join(",",keys %INC),"\n";

   
    
    
  








Related examples in the same category

1.Syntac of using a module
2.Use constant PI
3.The diagnostics Pragma
4.The strict Pragma and Words
5.The warnings Pragma and the -w Switch