On 03/06/14 12:32, Greg Ercolano wrote:
[posted to rush.general]
Just noticed this issue with a customer:
$ perl -e 'require "ctime.pl"; print "Hello\n";'
Can't locate ctime.pl in @INC (@INC contains: /Library/Perl/5.16/darwin-thread-multi-2level /Library/Perl/5.16 /Network/Library/Perl/5.16/darwin-thread-multi-2level /Network/Library/Perl/5.16 /Library/Perl/Updates/5.16.2 /System/Library/Perl/5.16/darwin-thread-multi-2level /System/Library/Perl/5.16 /System/Library/Perl/Extras/5.16/darwin-thread-multi-2level /System/Library/Perl/Extras/5.16 .) at -e line 1.
Apparently this is a change in perl, not an apple problem.
Seems in Perl 5.14, ctime.pl and a bunch of other perl4 style
files have been dropped unceremoniously.
The comments in the file have apparently been warning about this
since 5.12
;# ctime.pl is a simple Perl
emulation for the well known ctime(3C) function.
#
# This library is no longer being maintained, and
is included for backward
# compatibility with Perl 4 programs which may
require it.
# This legacy library is deprecated and will
be removed in a future
# release of perl.
And on this page, confirmation that it was removed in 5.14:
http://search.cpan.org/~rjbs/perl-5.16.0/pod/perldelta.pod#Removed_Modules_and_P
ragmata
..which
says:
Several old perl4-style libraries
which have been deprecated with 5.14 are now removed:
abbrev.pl assert.pl bigfloat.pl bigint.pl bigrat.pl cacheout.pl
complete.pl ctime.pl dotsh.pl exceptions.pl fastcwd.pl flush.pl
getcwd.pl getopt.pl getopts.pl hostname.pl importenv.pl
lib/find{,depth}.pl look.pl newgetopt.pl open2.pl open3.pl
pwd.pl shellwords.pl stat.pl tainted.pl termcap.pl timelocal.pl
..ctime.pl being part of that list. Great, that sucks.
The comments recommend using POSIX::ctime.
So instead of doing the old style:
require "ctime.pl";
..you would instead use:
use POSIX;
..which will cause any call to ctime() to resolve
correctly.