Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Exporting use strict/warnings into main::

by 1nickt (Canon)
on May 19, 2020 at 19:06 UTC ( [id://11116948]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ cat MyClass.pm
    
  2. or download this
    use strict;
    use warnings;
    ...
    };
    
    1;
    
  3. or download this
    $ cat script.pl
    
  4. or download this
    use lib '.';
    use MyClass;
    ...
    $bar = foo;
    
    print "$bar\n";
    
  5. or download this
    $ perl script.pl
    
  6. or download this
    42
    
  7. or download this
    $ cat MyClass2.pm
    
  8. or download this
    use strict;
    use warnings;
    ...
    };
    
    1;
    
  9. or download this
    $ cat script2.pl
    
  10. or download this
    use lib '.';
    use MyClass2;
    ...
    $bar = foo;
    
    print "$bar\n";
    
  11. or download this
    $ perl script2.pl
    
  12. or download this
    Global symbol "$bar" requires explicit package name (did you forget to
    + declare "my $bar"?) at script2.pl line 4.
    Global symbol "$bar" requires explicit package name (did you forget to
    + declare "my $bar"?) at script2.pl line 6.
    Execution of script2.pl aborted due to compilation errors.
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-23 15:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found