# Example 1... The best pre-Perl v5.6.0 way. package foobar; use strict; use warnings; use vars qw(@ISA @EXPORT); @ISA = qw(Exporter); @EXPORT = qw(foo bar); # Example 2... The best Perl v5.6.0 + way. package foobar; use strict; use warnings; our @ISA = qw(Exporter); our @EXPORT = qw(foo bar); # Example 3... The 'base' way. package foobar; use strict; use warnings; use base qw(Exporter); # But you still have to either 'use vars' or 'our' for the # export list @EXPORT. our @EXPORT = qw(foo bar);
Dave
In reply to Re: Re: Re: using package functions and vars withouth packagename::
by davido
in thread using package functions and vars withouth packagename::
by mutated
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |