oops, left off a ; and a 1; corrections below. ----- Original Message ----- From: "Tanton Gibbs" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 22, 2002 4:44 PM Subject: Re: exporting Constants
> Sure it is, because you imported it from Test...I tried the following > example and it worked fine > > #In file THGTest.pm > > package THGTest; > use Exporter; > > our @ISA=qw(Exporter); > our @EXPORT_OK=qw(HI); > > use constant HI => 'Hi, I am a constant.' should be use constant HI => 'Hi, I am a constant.'; 1; > > #in file test.pl > use THGTest qw(HI); > > print HI, "\n"; > > Two notes: > 1.) In your original example, you didn't have the @ISA, which IIRC, is > necessary > 2.) You should never create a Test.pm because perl already comes with > Test.pm > > Tanton > ----- Original Message ----- > From: "david" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, November 22, 2002 4:13 PM > Subject: Re: exporting Constants > > > > Tanton Gibbs wrote: > > > > > Huh? I thought constants were implemented as functions? In other > words, > > > HI and HI() should both refer to the same entity. > > > > true. but not in the your current namespace. > > > > david > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
