On 11/4/05, KEITA Alhassane Abdel <[EMAIL PROTECTED]> wrote:
> hello.
>
> I've tryed to use some variables declared into my package "test.pm" in my
> script "test.pl". I work under "Windows XP".
>
> "test.pl"
> -----------------------------------------------------------
> use strict ;
> use lib('E:\Program Files\EasyPHP1-8\cgi-bin\devis') ;
> use test;
> print "$var1\n" ;
> sub_test();
>
> "test.pm"
> -----------------------------------------------------------
> package test ;
> BEGIN{
>  use Exporter ;
>  our @ISA = qw(Exporter) ;
>  our @EXPORT = qw ($var1 &sub_test) ;
> }
> my $var1 = 100 ;

Change "my" to "our".

> sub sub_test{
>  print "Sub sucessfully imported" ;
> }
> 1;
> END{}

Actually, "1;" should be the very last line.

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to