Re: Bareword Constant from Package giving problems with use strict....

2003-01-22 Thread Rob Dixon
Michael Kingsbury wrote: >> print Dog::Hello; > > That was it, they weren't exported I think. Refering to them as > Win32::File::ARCHIVE, I don't have the problem. Hi Mike The Win32::File module exports the constants by default. If you want to import GetAttributes and SetAttributes as well you h

Re: Bareword Constant from Package giving problems with use strict....

2003-01-21 Thread david
Michael Kingsbury wrote: >> print Dog::Hello; > > That was it, they weren't exported I think. Refering to them as > Win32::File::ARCHIVE, I don't have the problem. > > -mike you can check what they export by default. for example: [panda@dzhuo]$ perl -MFcntl -e 'print "$_\n" for(@Fcntl::EXPORT

Re: Bareword Constant from Package giving problems with use strict....

2003-01-21 Thread Michael Kingsbury
> print Dog::Hello; That was it, they weren't exported I think. Refering to them as Win32::File::ARCHIVE, I don't have the problem. -mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Bareword Constant from Package giving problems with use strict....

2003-01-21 Thread david
David wrote: > > print Dog::Hello; > the above should be: print Dog::HELLO; sorry. i mistyped the constant's name. david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Bareword Constant from Package giving problems with use strict....

2003-01-21 Thread david
Michael Kingsbury wrote: > The Win32::File uses ARCHIVE, READONLY, SYSTEM, HIDDEN, etc as constants > for use with the file attribute types. However, with use strict, perl > barfs due to a bareword. > they should be used the same way vars, subs are used. if they are exported, just use them. if

Re: Bareword Constant from Package giving problems with use strict....

2003-01-21 Thread Michael Kingsbury
The Win32::File uses ARCHIVE, READONLY, SYSTEM, HIDDEN, etc as constants for use with the file attribute types. However, with use strict, perl barfs due to a bareword. On 22 Jan 2003, simran wrote: > not sure what you mean... > > but perhaps the following might help: > > * use constant

Re: Bareword Constant from Package giving problems with use strict....

2003-01-21 Thread simran
not sure what you mean... but perhaps the following might help: * use constant ABC => 'this is some text'; * use vars ... On Wed, 2003-01-22 at 12:28, Michael Kingsbury wrote: > How do I use a (known) Bareword constant from a package when strict's on? > > -mike -- To unsubscribe, e-mai

Bareword Constant from Package giving problems with use strict....

2003-01-21 Thread Michael Kingsbury
How do I use a (known) Bareword constant from a package when strict's on? -mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]