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

Re^8: Global variables in Perl

by taioba (Acolyte)
on Jun 04, 2010 at 22:08 UTC ( #843221=note: print w/ replies, xml ) Need Help??


in reply to Re^7: Global variables in Perl
in thread Global variables in Perl

Sorry, must have got garbled in the transfer to the website. See the whole thing below. Note that if this was the case, the script would not have run the second time after changing strict and execution would be aborted at compilation because Perl wouldn't find ExportScalar.

type ExportScalar.pm package ExportScalar; use strict; use warnings; use Exporter; our @ISA = qw( Exporter ); our @EXPORT_OK = qw( DEBUG ); our $DEBUG = 1; sub DEBUG { if (@_) { $DEBUG = shift; } return $DEBUG; } 1;


Comment on Re^8: Global variables in Perl
Download Code
Replies are listed 'Best First'.
Re^9: Global variables in Perl
by taioba (Acolyte) on Jun 04, 2010 at 22:25 UTC

    Ooooooops, my bad! It has to be 'package SS::ExportScalar' instead of just 'package ExportScalar'! Thank you so much! My NPR donation will be diverted to the Perl Monks! ;o)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2015-07-08 04:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls