[Israel.pm] constants

Berler Chanan bc.other at gmail.com
Thu Sep 3 09:20:36 PDT 2009


Can't do that, since I don't use package/module name due to an old reason I
can't recall.
Chanan

-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On Behalf
Of Roey Almog (Infoneto Ltd)
Sent: Thursday, September 03, 2009 3:28 PM
To: Perl in Israel
Subject: Re: [Israel.pm] constants

Should use common_pdf::pt so you do not have name collisions if pt is
already defined in the main script

see http://perldoc.perl.org/Exporter.html for more info on Exporting
variables from modules

Roey



On Thu, Sep 3, 2009 at 4:48 PM, Berler Chanan <chananb at centerity.com> wrote:
>
> Hi All,
>
> Question for you people:
> I have got a 2 files like these: one if a perl module, and the other is a
> script using require to include the file.
> Q: why pt is not defined in Myscript.pl file, although I used the required
> ?
> Thanks
> Chanan
>
> common_pdf.pm
>
> =======================
> use constant pt => 1;
> 1;
>
> Myscript.pl
> ========================
> require "common_pdf.pm";
>
> my $lv_num = pt;
> print $lv_num;
>
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://mail.perl.org.il/mailman/listinfo/perl
_______________________________________________
Perl mailing list
Perl at perl.org.il
http://mail.perl.org.il/mailman/listinfo/perl
No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.409 / Virus Database: 270.13.76/2342 - Release Date: 09/02/09
18:03:00



More information about the Perl mailing list