# New Ticket Created by  Andy Dougherty 
# Please include the string:  [perl #30397]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=30397 >


There are a variety of places in the languages/ directory that require
at least perl 5.006.  This patch puts in 'require 5.006' in those files.
If we later decide to make everything work with 5.005, these will at least
mark some of the problem spots.  In the meantime, you at least get more
meaningful error messages.

Along similar lines, urm/urmc uses Time::HiRes, which isn't necessarily
available until perl 5.8, but at a quick glance it looks like it will work
ok without it.

diff -r -u parrot-current/languages/jako/jakoc parrot-andy/languages/jako/jakoc
--- parrot-current/languages/jako/jakoc Fri Feb 27 11:00:12 2004
+++ parrot-andy/languages/jako/jakoc    Mon Jun 21 15:11:37 2004
@@ -13,6 +13,11 @@

 use strict;

+# perl5.005 complains:
+# Can't locate object method "block" via package
+# "Jako::Construct::Block::File" at lib/Jako/Construct/Block.pm line 243.
+require 5.006;
+
 use Carp;
 use Data::Dumper;

diff -r -u parrot-current/languages/perl6/perl6 parrot-andy/languages/perl6/perl6
--- parrot-current/languages/perl6/perl6        Mon Jun 21 11:00:11 2004
+++ parrot-andy/languages/perl6/perl6   Mon Jun 21 15:11:37 2004
@@ -10,7 +10,12 @@
 # TODO's:
 # s. pod
 BEGIN{$SIG{__WARN__}=sub{print STDERR @_;$DB::single=1;}}
-use 5.005_03;  # _02 might work too, untested.
+
+# With 5.005, you get: Can't locate object method "new" via package
+# "P6C::IMCC::ExtRegex::CodeGen" at P6C/IMCC/ExtRegex.pm line 68.
+# when running the tests in t/rx/
+use 5.006;
+
 use strict;
 use FindBin;
 use lib "$FindBin::Bin/../../lib";
diff -r -u parrot-current/languages/regex/test.pl parrot-andy/languages/regex/test.pl
--- parrot-current/languages/regex/test.pl      Fri Feb 27 11:00:14 2004
+++ parrot-andy/languages/regex/test.pl Mon Jun 21 15:12:16 2004
@@ -1,8 +1,12 @@
 #! perl -w
-
 use strict;
 use FindBin;
-use File::Spec::Functions;
+
+# Running this with perl5.005 produces:
+# Can't locate object method "new" via package "Regex::CodeGen::IMCC"
+use 5.006;
+
+use File::Spec::Functions;     # In perl core only for >= 5.6.

 # FIXME: This is still probably unix-only, because the parrot binary
 # will have different names
diff -r -u parrot-current/languages/ruby/Makefile.PL 
parrot-andy/languages/ruby/Makefile.PL
--- parrot-current/languages/ruby/Makefile.PL   Mon Aug 12 01:06:33 2002
+++ parrot-andy/languages/ruby/Makefile.PL      Mon Jun 21 15:11:38 2004
@@ -1,4 +1,5 @@
 use ExtUtils::MakeMaker;
+use 5.006;
 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
 # the contents of the Makefile that is written.
 WriteMakefile(
diff -r -u parrot-current/languages/urm/urmc parrot-andy/languages/urm/urmc
--- parrot-current/languages/urm/urmc   Fri Feb 27 11:00:14 2004
+++ parrot-andy/languages/urm/urmc      Mon Jun 21 15:11:38 2004
@@ -6,14 +6,13 @@

 ## See if we can do pasm:

-use warnings;
 use strict;

 use Getopt::Long;
 use FindBin;
 use lib "$FindBin::RealBin/../../lib";
 use Parrot::Config;
-use Time::HiRes qw(time);
+BEGIN { eval " use Time::HiRes qw(time); " }

 use vars qw($filename
            $compile

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to