On Tue, Oct 09, 2007 at 07:25:43AM +0200, Andreas J. Koenig
wrote:
> 16:03 < Steve_p> Hmmm....I guess I just had a
bad version that was causing YAML to fail
> 16:09 * rgs eyes Nicholas
> 16:13 * Nicholas hides
>
> Nicholas, breakfast is ready, crunchy nutty cereals!
>
> ----Program----
> eval q{use YAML 0.66};
> print $ ? "N/A" : "OK";
> print "n";
>
> ----Output of .../ppQOJ0u/perl-5.8.0 32031/bin/perl----
> OK
>
> ----EOF ($?='0')----
> ----Output of .../pwtftS3/perl-5.8.0 32032/bin/perl----
> N/A
Odd. I don't see that program failing. Unless it fails for
you because YAML
wasn't installing on 32032 because it failed a regression
test.
B: eparse
used to generate this output:
$ ./perl -MO=Deparse -e 'use 5.006; use 5.8.0'
sub BEGIN {
require 5.006;
}
sub BEGIN {
BEGIN {
$^H{'v_string'} = q(1);
}
require 5.8.0;
}
-e syntax OK
I've changed it to this:
$ ./perl -Ilib -MO=Deparse -we 'use 5.006; use 5.8.0'
BEGIN { $^W = 1; }
sub BEGIN {
require 5.006;
}
sub BEGIN {
require 5.8.0;
}
-e syntax OK
YAML now passes tests for me, unchanged.
I tried to write a test for it, but failed. This doesn't
work:
==== //depot/perl/ext/B/t/deparse.t#30 -
/home/nick/p4perl/perl/ext/B/t/deparse.t ====
--- /tmp/tmp.7126.0 Tue Oct 9 13:00:54 2007
+++ /home/nick/p4perl/perl/ext/B/t/deparse.t Tue Oct 9
13:00:44 2007
 -27,7
+27,7  BEGIN {
require feature;
feature->import(':5.10');
}
-use Test::More tests => 54;
+use Test::More tests => 55;
use B: eparse;
my $deparse = B: eparse-&
gt;new();
 -384,3
+384,11  $a = sub {
return $x++;
}
;
+####
+# 49
+BEGIN {
+ require 5.006;
+}
+BEGIN {
+ require 5.8.0;
+}
If anyone can figure out how to write a test, patches
welcome.
Nicholas Clark
|