Hello,
I get a couple of errors which require me to turn off 'strict refs' in at least two functions:
CPAN::Forum
Time-Piece - Clash with strict refs in 2 places in the code
| Posted on Tue Jul 18 11:47:51 2006 by mgirod |
| Clash with strict refs in 2 places in the code |
|
Hello,
I get a couple of errors which require me to turn off 'strict refs' in at least two functions:
Can't use string ("Time::Piece") as an ARRAY ref while "strict refs" in use at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Time/Piece.pm line 304 (#1)
(F) Only hard references are allowed by "strict refs". Symbolic
references are disallowed. See perlref.
Uncaught exception from user code:
Can't use string ("Time::Piece") as an ARRAY ref while "strict refs" in use at /usr/lib/perl5/site
+_perl/5.8.5/i386-linux-thread-multi/Time/Piece.pm line 304.
at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Time/Piece.pm line 304
Time::Piece::epoch('Time::Piece') called at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
+/Time/Piece.pm line 456
Time::Piece::strftime('Time::Piece', 'Time::Piece=ARRAY(0x8382c20)', '%d/%m.%H') called at ...
and
Can't use string ("Time::Piece") as an ARRAY ref while "strict refs" in use at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Time/Piece.pm line 304 (#1)
(F) Only hard references are allowed by "strict refs". Symbolic
references are disallowed. See perlref.
Uncaught exception from user code:
Can't use string ("Time::Piece") as an ARRAY ref while "strict refs" in use at /usr/lib/perl5/site
+_perl/5.8.5/i386-linux-thread-multi/Time/Piece.pm line 304.
at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Time/Piece.pm line 304
Time::Piece::epoch('Time::Piece') called at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
+/Time/Piece.pm line 456
Time::Piece::strftime('Time::Piece', 'Time::Piece=ARRAY(0x8382c20)', '%d/%m.%H') called at ./graph
+-tj line 55
main::readin('/var/log/timejobs.log', 10) called at ./graph-tj line 79
Is it my own code, or is there a problem with the module? The error can be (not in the two cases above) reported in my code at 'use Time::Piece;'... e.g. this:
Can't use string ("main::localtime") as a symbol ref while "strict refs" in use at /usr/lib/perl5/s
+ite_perl/5.8.5/i386-linux-thread-multi/Time/Piece.pm line 124.
BEGIN failed--compilation aborted at ./graph-tj line 12 (#1)
(F) Only hard references are allowed by "strict refs". Symbolic
references are disallowed. See perlref.
Uncaught exception from user code:
Can't use string ("main::localtime") as a symbol ref while "strict refs" in use at /usr/lib/perl5/
+site_perl/5.8.5/i386-linux-thread-multi/Time/Piece.pm line 124.
BEGIN failed--compilation aborted at ./graph-tj line 12.
at ./graph-tj line 12
For now, I added "no strict 'refs';" in Piece.pm at lines (only these two additions) 123 and 303. This is: # $Id: Piece.pm,v 1.16.2.2 2006/02/11 12:55:26 rjbs Exp $
coming with 1.09, and under perl v5.8.5.
Thanks! Marc |
| Write a response |
(1)
]