> -----Original Message----- > From: josh hoblitt [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 18, 2001 5:01 AM > To: [EMAIL PROTECTED] > Subject: Warnings with strict and POSIX > > > I'm not sure exactly whats going on here. It seems the combination of > strict and POSIX ":sys_wait_h" is fine... but just POSIX seems to stop > the strict bareword warnings. Any idea whats going on here? (exporter > wierdness?) > > #!/usr/bin/perl -w > > use POSIX; > #use POSIX ":sys_wait_h"; > use strict; > > sysopen(FILE,"somefile.txt", O_WRONLY | O_APPEND | O_CREAT,0664); > close(FILE);
"use POSIX;" basically brings in the "default" set of symbols into your name space (i.e. those defined in @EXPORT). "use POSIX qw(:foo)" calls on an export "tag" which typically will import a basket of symbols (although the arguments passed to import can do other things besides importing symbols). So "use POSIX qw(:sys_wait_h)" is evidently importing O_WRONLY, etc. into your namespace so use strict doesn't complain. You can always access the symbols even if they aren't imported, as &POSIX::O_WRONLY for example. Look at the docs for use and Exporter for the full poop. BTW, those symbols are typically imported using the Fcntl module, if I'm not mistaken. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]