Help for this page

Select Code to Download


  1. or download this
    #./ThisPackage.pm
    package ThisPackage;
    ...
    print "Dummy code gets run at compile/use time\n";
    
    1;
    
  2. or download this
    #./pkg.pl
    BEGIN { print "this should print before\n" }
    ...
    use ThisPackage;
    ThisPackage::new(qw/hello world/);
    BEGIN { print "this should print after the use, but before the new\n" 
    +}
    
  3. or download this
    # output
    this should print before
    Dummy code gets run at compile/use time
    this should print after the use, but before the new
    ThisPackage::new(hello world)