From d711238061ae1c09f9e40d93b5b04f3d83efeab4 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 17 Jan 2011 12:59:21 -0600 Subject: make sure __DATA__ sections are preserved --- t/06-runtime.t | 5 +++++ t/lib/06/Bar/Bar.pm | 8 ++++++++ t/lib/06/Bar/Baz.pm | 8 ++++++++ t/lib/06/Bar/Foo.pm | 8 ++++++++ t/lib/06/Bar/Quux.pm | 8 ++++++++ 5 files changed, 37 insertions(+) diff --git a/t/06-runtime.t b/t/06-runtime.t index e8a18cc..d3c210f 100644 --- a/t/06-runtime.t +++ b/t/06-runtime.t @@ -34,6 +34,11 @@ use_ok_warnings( ['Bar::Conflicts', 'Bar::Quux::Bad', '0.01', '0.01'], ); +is(Bar::Foo->contents, "__DATA__ for Bar::Foo\n", "__DATA__ sections intact"); +is(Bar::Bar->contents, "__DATA__ for Bar::Bar\n", "__DATA__ sections intact"); +is(Bar::Baz->contents, "__DATA__ for Bar::Baz\n", "__DATA__ sections intact"); +is(Bar::Quux->contents, "__DATA__ for Bar::Quux\n", "__DATA__ sections intact"); + is(scalar(grep { ref($_) eq 'ARRAY' && @$_ > 1 && ref($_->[1]) eq 'HASH' } @INC), 1, diff --git a/t/lib/06/Bar/Bar.pm b/t/lib/06/Bar/Bar.pm index b355817..d532db6 100644 --- a/t/lib/06/Bar/Bar.pm +++ b/t/lib/06/Bar/Bar.pm @@ -7,4 +7,12 @@ use Bar::Bar::Bad; our $VERSION = 0.01; +sub contents { + local $/; + +} + 1; + +__DATA__ +__DATA__ for Bar::Bar diff --git a/t/lib/06/Bar/Baz.pm b/t/lib/06/Bar/Baz.pm index 8704283..b4db03b 100644 --- a/t/lib/06/Bar/Baz.pm +++ b/t/lib/06/Bar/Baz.pm @@ -7,4 +7,12 @@ use Bar::Baz::Bad; our $VERSION = 0.02; +sub contents { + local $/; + +} + 1; + +__DATA__ +__DATA__ for Bar::Baz diff --git a/t/lib/06/Bar/Foo.pm b/t/lib/06/Bar/Foo.pm index 005ae1f..99341ac 100644 --- a/t/lib/06/Bar/Foo.pm +++ b/t/lib/06/Bar/Foo.pm @@ -7,4 +7,12 @@ use Bar::Foo::Bad; our $VERSION = 0.01; +sub contents { + local $/; + +} + 1; + +__DATA__ +__DATA__ for Bar::Foo diff --git a/t/lib/06/Bar/Quux.pm b/t/lib/06/Bar/Quux.pm index 99d0312..1ec6f35 100644 --- a/t/lib/06/Bar/Quux.pm +++ b/t/lib/06/Bar/Quux.pm @@ -7,4 +7,12 @@ use Bar::Quux::Bad; our $VERSION = 0.02; +sub contents { + local $/; + +} + 1; + +__DATA__ +__DATA__ for Bar::Quux -- cgit v1.2.3-54-g00ecf