On Mon Dec 26 10:39:11 2011, ANDK wrote:
Show quoted text
Here’s a patch.
diff -rup YAML-0.77-4Pwy2R/t/dump-code.t YAML-0.77-4Pwy2R-copy/t/dump-code.t
--- YAML-0.77-4Pwy2R/t/dump-code.t 2011-03-31 09:44:53.000000000 -0700
+++ YAML-0.77-4Pwy2R-copy/t/dump-code.t 2012-01-01 21:01:44.000000000 -0800
@@ -1,5 +1,13 @@
use t::TestYAML tests => 7;
+use B::Deparse;
+if (new B::Deparse -> coderef2text ( sub { no strict; 1; use strict; 1; })
+ =~ 'refs') {
+ local $/;
+ (my $data = <DATA>) =~ s/use strict/use strict 'refs'/g;
+ open DATA, '<', \$data;
+}
+
no_diff;
run_roundtrip_nyn('dumper');
@@ -15,7 +23,7 @@ return sub { 'Something at least 30 char
--- !!perl/code |
{
use warnings;
- use strict 'refs';
+ use strict;
'Something at least 30 chars';
}
@@ -31,7 +39,7 @@ my $joe_random_global = sub { 'Something
- &1 !!perl/code |
{
use warnings;
- use strict 'refs';
+ use strict;
'Something at least 30 chars';
}
- *1
@@ -56,6 +64,6 @@ bless sub { 'Something at least 30 chars
--- !!perl/code:Foo::Bar |
{
use warnings;
- use strict 'refs';
+ use strict;
'Something at least 30 chars';
}