Exporting in two packages but one file
- From: barth@xxxxxxxxxx (Martin Barth)
- Date: Tue, 08 May 2007 10:58:43 +0200
Hi all,
I have a Package A with serveral subs in it and now I want to make a package A::Types with some constants in it.
I have A.pm with:
...some code and subs ..
package A::Type;
use constant { CONST1 => "foo", CONST2 => "bar"};
package A;
...some more code and subs..
now I wanted to use the Exporter and wrote in the "package A::Type" part of the file:
sub BEGIN {
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(CONST1 CONST2);
our %EXPORT_TAGS = ( standard => [qw(CONST1 CONST2)]);
}
but now I dont know to import the stuff. I can't do a "use A::Type qw(:standard)" because I dont have A/Type.pm
do you have any suggestions how this can be done?
thanks for the help!
Martin
.
- Follow-Ups:
- Re: Exporting in two packages but one file
- From: Mumia W.
- Re: Exporting in two packages but one file
- From: Jeff Pang
- Re: Exporting in two packages but one file
- Prev by Date: Re: SOS - perl script
- Next by Date: Re: Inserting Image in a Button or label.
- Previous by thread: how to convert the following ASP code into perl code
- Next by thread: Re: Exporting in two packages but one file
- Index(es):
Relevant Pages
|