[Israel.pm] constants

Roey Almog (Infoneto Ltd) almog at infoneto.co.il
Thu Sep 3 06:27:38 PDT 2009


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


More information about the Perl mailing list