nayakgi / perl-compiler

Automatically exported from code.google.com/p/perl-compiler
Other
0 stars 0 forks source link

Missing SEEK_SET, No IO::Seekable in IO::Compress::RawDeflate #375

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'll get better steps shortly. This message is just to get a case number. 
Basically we had code that was compiling in and using IO::Compress::RawDeflate. 
We would then run time load Cache::Memcached ();. We would then get this error.

Bareword "SEEK_SET" not allowed while "strict subs" in use at /usr/local/cp
anel/3rdparty/perl/514/lib64/perl5/cpanel_lib/IO/Compress/RawDeflate.pm line 
193.

A work around was to change SEEK_SET in the code to be IO::Seekable::SEEK_SET, 
but I would describe this as a bug.

IO::Seekable imports SEEK_SET into it's namespace from Fcntl and then 
re-exports it into IO::Compress::RawDeflate. This doesn't seem to compile right 
at the moment.

Original issue reported on code.google.com by todd.e.rinaldo on 10 Nov 2014 at 4:37

GoogleCodeExporter commented 9 years ago

Original comment by reini.urban on 11 Nov 2014 at 8:39

GoogleCodeExporter commented 9 years ago
IO::Seekable is an internal dependency, which may be optimized out, if not 
used. If you only run-time load a module which uses IO::Seekable we have a 
problem. 

The usual workaround is then to mark it with -uIO::Seekable, so that the 
compiler knows, that it is required. Using IO::Seekable::SEEK_SET is even 
better.

I'm not sure, if we should change the compiler to save all internal modules, 
when it might be run-time required later.

Original comment by reini.urban on 11 Nov 2014 at 8:45