@@ -19,13 +19,14 @@ my %module_build_args = (
"Yanick Champoux <yanick\@cpan.org>"
],
"dist_name" => "NetPacket",
- "dist_version" => "1.4.1",
+ "dist_version" => "1.4.4",
"license" => "artistic_2",
"module_name" => "NetPacket",
"recommends" => {},
"recursive_test_files" => 1,
"requires" => {
"constant" => 0,
+ "perl" => "v5.10.0",
"strict" => 0,
"vars" => 0,
"warnings" => 0
@@ -40,17 +41,18 @@ my %module_build_args = (
);
+my %fallback_build_requires = (
+ "File::Spec" => 0,
+ "IO::Handle" => 0,
+ "IPC::Open3" => 0,
+ "Module::Build" => "0.3601",
+ "Test::More" => "0.88"
+);
+
+
unless ( eval { Module::Build->VERSION(0.4004) } ) {
- my $tr = delete $module_build_args{test_requires};
- my $br = $module_build_args{build_requires};
- for my $mod ( keys %$tr ) {
- if ( exists $br->{$mod} ) {
- $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod};
- }
- else {
- $br->{$mod} = $tr->{$mod};
- }
- }
+ delete $module_build_args{test_requires};
+ $module_build_args{build_requires} = \%fallback_build_requires;
}
my $build = Module::Build->new(%module_build_args);
@@ -6,9 +6,13 @@ make this distribution what it is, either via code contributions,
patches, bug reports, help with troubleshooting, etc. A huge
thank to all of them.
+ * Andreas Schwab <schwab@suse.de>
* Ben Magistro <koncept1@gmail.com>
+ * Dinar Valeev <dvaleev@suse.de>
* Lubomir Rintel <lkundrak@v3.sk>
+ * Neil Bowers <neil@bowers.com>
* Robin Lee <cheeselee@fedoraproject.org>
* Stan Schwertly <stan@linode.com>
* Stephanie Wehner <atrak@cpan.org>
* Tim Potter <timpotter@cpan.org>
+ * fschlich <fsfs@debian.org>
@@ -1,5 +1,32 @@
revision history for NetPacket
+1.4.4 2013-11-30
+ [BUG FIXES]
+ - NetPacket::USBMon: also handle big endian perl without quad type.
+ (GH#5, Andreas Schwab)
+ - Typo fix in comments. (GH#6, fschlich)
+
+ [STATISTICS]
+ - code churn: 3 files changed, 13 insertions(+), 4 deletions(-)
+
+1.4.3 2013-10-03
+ [BUG FIXES]
+ - Unpack data in LittleEndian format. (GH#4, k0da)
+
+ [STATISTICS]
+ - code churn: 3 files changed, 62 insertions(+), 27 deletions(-)
+
+1.4.2 2013-09-25
+ [BUG FIXES]
+ - Dist::Zilla::Plugin::Test::Compile was causing test to potentially hang
+ on Windows. (reported by Karen Etheridge)
+
+ [MISC]
+ - Tidy up the changelog. (GH#3, Neil Bowers)
+
+ [STATISTICS]
+ - code churn: 2 files changed, 46 insertions(+), 20 deletions(-)
+
1.4.1 2013-09-05
[BUG FIXES]
- Test was using Errno constant and failing on some platforms.
@@ -63,18 +90,6 @@ revision history for NetPacket
as the license of the patch clashes with the license of the
distribution. (RT#62197)
-0.41_0
- - Fixed bug 18941 - NetPacket::IP includes trailing trash bytes in
- $ip->{data}
- - Fixed bug 7010 - IP flags field lost in IP::encode()
- - Added Build.PL
- - Moved history off the README file into this one (Changes)
- - Moved module structure to /lib
- - Version now gathered from NetPacket.pm
- - META.yml added to MANIFEST
- - Added myself (Yanick) as author
- - Switched to major.minor.revision version notation
-
0.43.2 2010-10-11
- Change the COPYRIGHT sections of the pods to match the Artistic 2.0
license. (RT#60954)
@@ -92,13 +107,30 @@ revision history for NetPacket
- Updated license to Artistic 2.0
- Fixed bad call to 'data()' in ICMP. Thanks to Ventz Petkov. (RT#52627)
-0.41.1
+0.41.1 2009-01-06
- Fixed bug 37931: export of ICMP_MASKREQ
- Fixed UDP and TCP checksums for odd-sized packets
- Fixed import from NetPacket::UDP
- Fixed bug 37931: export of ICMP_MASKREQ
- Added git repo and bug tracking info to META.yml
-0.04
+0.41.0_0 2008-12-20
+ - Fixed bug 18941 - NetPacket::IP includes trailing trash bytes in
+ $ip->{data}
+ - Fixed bug 7010 - IP flags field lost in IP::encode()
+ - Added Build.PL
+ - Moved history off the README file into this one (Changes)
+ - Moved module structure to /lib
+ - Version now gathered from NetPacket.pm
+ - META.yml added to MANIFEST
+ - Added myself (Yanick) as author
+ - Switched to major.minor.revision version notation
+
+0.04 2003-05-21
- Checksum offset fix, thanks to J. Hoagland for pointing this out.
+0.03 2001-07-30
+
+0.01 1999-04-24
+ - First release by TIMPOTTER
+
@@ -6,7 +6,7 @@
"Yanick Champoux <yanick@cpan.org>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.300037, CPAN::Meta::Converter version 2.120921",
+ "generated_by" : "Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.120921",
"license" : [
"artistic_2"
],
@@ -34,6 +34,7 @@
"runtime" : {
"requires" : {
"constant" : "0",
+ "perl" : "v5.10.0",
"strict" : "0",
"vars" : "0",
"warnings" : "0"
@@ -51,39 +52,39 @@
"provides" : {
"NetPacket" : {
"file" : "lib/NetPacket.pm",
- "version" : "v1.4.1"
+ "version" : "v1.4.4"
},
"NetPacket::ARP" : {
"file" : "lib/NetPacket/ARP.pm",
- "version" : "v1.4.1"
+ "version" : "v1.4.4"
},
"NetPacket::Ethernet" : {
"file" : "lib/NetPacket/Ethernet.pm",
- "version" : "v1.4.1"
+ "version" : "v1.4.4"
},
"NetPacket::ICMP" : {
"file" : "lib/NetPacket/ICMP.pm",
- "version" : "v1.4.1"
+ "version" : "v1.4.4"
},
"NetPacket::IGMP" : {
"file" : "lib/NetPacket/IGMP.pm",
- "version" : "v1.4.1"
+ "version" : "v1.4.4"
},
"NetPacket::IP" : {
"file" : "lib/NetPacket/IP.pm",
- "version" : "v1.4.1"
+ "version" : "v1.4.4"
},
"NetPacket::TCP" : {
"file" : "lib/NetPacket/TCP.pm",
- "version" : "v1.4.1"
+ "version" : "v1.4.4"
},
"NetPacket::UDP" : {
"file" : "lib/NetPacket/UDP.pm",
- "version" : "v1.4.1"
+ "version" : "v1.4.4"
},
"NetPacket::USBMon" : {
"file" : "lib/NetPacket/USBMon.pm",
- "version" : "v1.4.1"
+ "version" : "v1.4.4"
}
},
"release_status" : "stable",
@@ -99,15 +100,19 @@
"web" : "https://github.com/yanick/netpacket"
}
},
- "version" : "1.4.1",
+ "version" : "1.4.4",
"x_authority" : "cpan:YANICK",
"x_contributors" : [
+ "Andreas Schwab <schwab@suse.de>",
"Ben Magistro <koncept1@gmail.com>",
+ "Dinar Valeev <dvaleev@suse.de>",
"Lubomir Rintel <lkundrak@v3.sk>",
+ "Neil Bowers <neil@bowers.com>",
"Robin Lee <cheeselee@fedoraproject.org>",
"Stan Schwertly <stan@linode.com>",
"Stephanie Wehner <atrak@cpan.org>",
- "Tim Potter <timpotter@cpan.org>"
+ "Tim Potter <timpotter@cpan.org>",
+ "fschlich <fsfs@debian.org>"
]
}
@@ -13,7 +13,7 @@ build_requires:
configure_requires:
Module::Build: 0.3601
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.300037, CPAN::Meta::Converter version 2.120921'
+generated_by: 'Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.120921'
license: artistic_2
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -22,33 +22,34 @@ name: NetPacket
provides:
NetPacket:
file: lib/NetPacket.pm
- version: v1.4.1
+ version: v1.4.4
NetPacket::ARP:
file: lib/NetPacket/ARP.pm
- version: v1.4.1
+ version: v1.4.4
NetPacket::Ethernet:
file: lib/NetPacket/Ethernet.pm
- version: v1.4.1
+ version: v1.4.4
NetPacket::ICMP:
file: lib/NetPacket/ICMP.pm
- version: v1.4.1
+ version: v1.4.4
NetPacket::IGMP:
file: lib/NetPacket/IGMP.pm
- version: v1.4.1
+ version: v1.4.4
NetPacket::IP:
file: lib/NetPacket/IP.pm
- version: v1.4.1
+ version: v1.4.4
NetPacket::TCP:
file: lib/NetPacket/TCP.pm
- version: v1.4.1
+ version: v1.4.4
NetPacket::UDP:
file: lib/NetPacket/UDP.pm
- version: v1.4.1
+ version: v1.4.4
NetPacket::USBMon:
file: lib/NetPacket/USBMon.pm
- version: v1.4.1
+ version: v1.4.4
requires:
constant: 0
+ perl: v5.10.0
strict: 0
vars: 0
warnings: 0
@@ -56,12 +57,16 @@ resources:
bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=NetPacket
homepage: http://search.cpan.org/dist/NetPacket/
repository: https://github.com/yanick/netpacket.git
-version: 1.4.1
+version: 1.4.4
x_authority: cpan:YANICK
x_contributors:
+ - 'Andreas Schwab <schwab@suse.de>'
- 'Ben Magistro <koncept1@gmail.com>'
+ - 'Dinar Valeev <dvaleev@suse.de>'
- 'Lubomir Rintel <lkundrak@v3.sk>'
+ - 'Neil Bowers <neil@bowers.com>'
- 'Robin Lee <cheeselee@fedoraproject.org>'
- 'Stan Schwertly <stan@linode.com>'
- 'Stephanie Wehner <atrak@cpan.org>'
- 'Tim Potter <timpotter@cpan.org>'
+ - 'fschlich <fsfs@debian.org>'
@@ -2,7 +2,7 @@ NAME
NetPacket - assemble/disassemble network packets at the protocol level
VERSION
- version 1.4.1
+ version 1.4.4
SYNOPSIS
# NetPacket is a base class only
@@ -4,7 +4,7 @@ NetPacket - assemble/disassemble network packets at the protocol level
# VERSION
-version 1.4.1
+version 1.4.4
# SYNOPSIS
@@ -14,27 +14,27 @@ not run its Makefile.PL or Build.PL.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-SHA1 ca0e57f2cf703ff0e0459ced37bbac90f0e86a17 Build.PL
-SHA1 8678bf3cb46c9f3cb1165844f6e39021ce2081d2 CONTRIBUTORS
-SHA1 1213e8292ff3b944f8cb9e15044e0d2512cd9ab0 Changes
+SHA1 857e8c0ea113d04621a7a6527e58a6c66ef10f48 Build.PL
+SHA1 9588ce60514e59a6d78f58516ce593c8a9b1b7e5 CONTRIBUTORS
+SHA1 f01054284913c9dedd69e5e47c0a609e6a20f826 Changes
SHA1 29b0b7b9d088441a05d8786d0dc4bb3bd558d205 INSTALL
SHA1 c2cbad0911cac62d6016e01230686f431b8e8e79 LICENSE
SHA1 af5b779acd642a12e7e5d7eb2a76278239fdada8 MANIFEST
-SHA1 c422f3971b944b3270ff6b86800276f9388f77b9 META.json
-SHA1 ce6d4da9fa8eeaa2e9f873dff3202ccb2cf0fe3d META.yml
-SHA1 fdd6abfaa7078155cc5913256bf72c336301b3f6 README
-SHA1 fefcdb5ccb3b5d82e02f8b6d612f2c78607f714e README.mkdn
-SHA1 22482c6297a8c473fd29b55f16ce70a7fefae4d7 lib/NetPacket.pm
-SHA1 957716750df00a60d82293832aa04da00e9cd5e0 lib/NetPacket/ARP.pm
-SHA1 01eabeedc165ff91ad963bcae2bf48ac9d3bdbe9 lib/NetPacket/Ethernet.pm
-SHA1 e41d7f6d10e9adb70b9b9611b3ed803641ac2a24 lib/NetPacket/ICMP.pm
-SHA1 26d06357e5783010f597c1778331fb91fcd339bc lib/NetPacket/IGMP.pm
-SHA1 9d070cb139cd35ab161b19ca213d752c1debdccc lib/NetPacket/IP.pm
-SHA1 722ac37568a58da5fc4cc66723c013e7e63e77e0 lib/NetPacket/TCP.pm
-SHA1 c15cc77827c01211fa4fb33a66c6698de328bfd5 lib/NetPacket/UDP.pm
-SHA1 c867b2f0ba338d01ca55e452394e32d26f1eb524 lib/NetPacket/USBMon.pm
-SHA1 73a132106eac2c407a4dbcd26f518a8c9c094c28 t/00-compile.t
-SHA1 e546e4fa1eaf515173636be6723fc09726dddf79 t/000-report-versions-tiny.t
+SHA1 67c3cf214f0aebfaa5207981bf38ed32d3d407c1 META.json
+SHA1 90d2ab84f7a55f5d0c7d850f595401d4b77e00bb META.yml
+SHA1 c5828e5b1bf3d202839a073743d1903fc42057b7 README
+SHA1 1860657046de1bd499fdcb0f67e701f59baa6d05 README.mkdn
+SHA1 ddbd5869d54649dd6aee5b1ee069fe7091563243 lib/NetPacket.pm
+SHA1 dd78f2e47a04f6f5dced6a569380ce27e7be7460 lib/NetPacket/ARP.pm
+SHA1 cf5b95b2466935e99dc9be6e3529a809863ed7ab lib/NetPacket/Ethernet.pm
+SHA1 64806c43c1504d1749789c2394b974e60fff570c lib/NetPacket/ICMP.pm
+SHA1 5addcd968d9de290375a67fa3d5f551c0fb195c3 lib/NetPacket/IGMP.pm
+SHA1 aec2304da86ff502df844617cd1acdf9772eef6b lib/NetPacket/IP.pm
+SHA1 047e218134c55c29dbcfc0954d1a77de97a3cf72 lib/NetPacket/TCP.pm
+SHA1 1aa5c49b6855bb2978e364a4d43bca14b521804a lib/NetPacket/UDP.pm
+SHA1 97d24a2aeddc5652863f4b9e526c5ea89aacf36e lib/NetPacket/USBMon.pm
+SHA1 c3fec81fac85eb3cdc17d46b6185123bf1839714 t/00-compile.t
+SHA1 49caa1fc3e93c71dbd13407526a79c33a3869c6b t/000-report-versions-tiny.t
SHA1 2f95a288a42eed0173859c5bb9d37caee7e4b26b t/bug-37931.t
SHA1 721a206d861139f8f73081b8d337bfcdce4247e5 t/checksum.t
SHA1 45f23540d419a608363a53ed11b81c589866406e t/ethernet.t
@@ -47,9 +47,9 @@ SHA1 540bff42594ee78beb63a7316a4478bc58d7e37b t/udp-checksum.t
SHA1 35bfbabbd32ddf83a0ac49db63f69de9ff6eadb2 t/udp.t
SHA1 86e62e4a5bceec942b536d2b29f7910f883c6387 t/usbmon.t
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.11 (GNU/Linux)
+Version: GnuPG v1.4.14 (GNU/Linux)
-iEYEARECAAYFAlIpHFUACgkQ34Hwf+GwC4wFqACfbKRziJ31sbmFab9Xh7v7IzxU
-yGwAnA0UTlVDlf+jvbv5ixP25DcLn4Rl
-=i9AK
+iEYEARECAAYFAlKaFPoACgkQ34Hwf+GwC4yLXQCfW++zXuQrXWUmK/eMiMBPKVvw
+7X8AoMSxss7UInp1yWod1ezGpRceqdpQ
+=6BTU
-----END PGP SIGNATURE-----
@@ -3,7 +3,7 @@ BEGIN {
$NetPacket::ARP::AUTHORITY = 'cpan:YANICK';
}
{
- $NetPacket::ARP::VERSION = '1.4.1';
+ $NetPacket::ARP::VERSION = '1.4.4';
}
# ABSTRACT: Assemble and disassemble ARP (Address Resolution Protocol) packets.
@@ -112,7 +112,7 @@ NetPacket::ARP - Assemble and disassemble ARP (Address Resolution Protocol) pack
=head1 VERSION
-version 1.4.1
+version 1.4.4
=head1 SYNOPSIS
@@ -3,7 +3,7 @@ BEGIN {
$NetPacket::Ethernet::AUTHORITY = 'cpan:YANICK';
}
{
- $NetPacket::Ethernet::VERSION = '1.4.1';
+ $NetPacket::Ethernet::VERSION = '1.4.4';
}
# ABSTRACT: Assemble and disassemble ethernet packets.
@@ -149,7 +149,7 @@ NetPacket::Ethernet - Assemble and disassemble ethernet packets.
=head1 VERSION
-version 1.4.1
+version 1.4.4
=head1 SYNOPSIS
@@ -3,7 +3,7 @@ BEGIN {
$NetPacket::ICMP::AUTHORITY = 'cpan:YANICK';
}
{
- $NetPacket::ICMP::VERSION = '1.4.1';
+ $NetPacket::ICMP::VERSION = '1.4.4';
}
# ABSTRACT: Assemble and disassemble ICMP (Internet Control Message Protocol) packets.
@@ -156,7 +156,7 @@ NetPacket::ICMP - Assemble and disassemble ICMP (Internet Control Message Protoc
=head1 VERSION
-version 1.4.1
+version 1.4.4
=head1 SYNOPSIS
@@ -7,7 +7,7 @@ BEGIN {
$NetPacket::IGMP::AUTHORITY = 'cpan:YANICK';
}
{
- $NetPacket::IGMP::VERSION = '1.4.1';
+ $NetPacket::IGMP::VERSION = '1.4.4';
}
# ABSTRACT: Assemble and disassemble IGMP (Internet Group Mangement Protocol) packets.
@@ -154,7 +154,7 @@ NetPacket::IGMP - Assemble and disassemble IGMP (Internet Group Mangement Protoc
=head1 VERSION
-version 1.4.1
+version 1.4.4
=head1 SYNOPSIS
@@ -8,7 +8,7 @@ BEGIN {
$NetPacket::IP::AUTHORITY = 'cpan:YANICK';
}
{
- $NetPacket::IP::VERSION = '1.4.1';
+ $NetPacket::IP::VERSION = '1.4.4';
}
# ABSTRACT: Assemble and disassemble IP (Internet Protocol) packets.
@@ -221,7 +221,7 @@ NetPacket::IP - Assemble and disassemble IP (Internet Protocol) packets.
=head1 VERSION
-version 1.4.1
+version 1.4.4
=head1 SYNOPSIS
@@ -9,7 +9,7 @@ BEGIN {
$NetPacket::TCP::AUTHORITY = 'cpan:YANICK';
}
{
- $NetPacket::TCP::VERSION = '1.4.1';
+ $NetPacket::TCP::VERSION = '1.4.4';
}
# ABSTRACT: Assemble and disassemble TCP (Transmission Control Protocol) packets.
@@ -302,7 +302,7 @@ NetPacket::TCP - Assemble and disassemble TCP (Transmission Control Protocol) pa
=head1 VERSION
-version 1.4.1
+version 1.4.4
=head1 SYNOPSIS
@@ -7,7 +7,7 @@ BEGIN {
$NetPacket::UDP::AUTHORITY = 'cpan:YANICK';
}
{
- $NetPacket::UDP::VERSION = '1.4.1';
+ $NetPacket::UDP::VERSION = '1.4.4';
}
# ABSTRACT: Assemble and disassemble UDP (User Datagram Protocol) packets.
@@ -140,7 +140,7 @@ NetPacket::UDP - Assemble and disassemble UDP (User Datagram Protocol) packets.
=head1 VERSION
-version 1.4.1
+version 1.4.4
=head1 SYNOPSIS
@@ -321,7 +321,7 @@ netcat, but otherwise makes little sense. :) Adapt to your needs:
# replace foo in the payload with bar
$udp_obj->{data} =~ s/foo/bar/g;
- # reencode the packet
+ # re-encode the packet
$ip_obj->{data} = $udp_obj->encode($udp_obj, $ip_obj);
$data = $ip_obj->encode;
@@ -3,8 +3,11 @@ BEGIN {
$NetPacket::USBMon::AUTHORITY = 'cpan:YANICK';
}
{
- $NetPacket::USBMon::VERSION = '1.4.1';
+ $NetPacket::USBMon::VERSION = '1.4.4';
}
+#ABSTRACT: Assemble and disassemble USB packets captured via Linux USBMon interface.
+
+use 5.10.0;
use strict;
use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
@@ -65,18 +68,18 @@ sub decode
my($id, $type, $xfer_type, $epnum, $devnum, $busnum, $flag_setup,
$flag_data, $ts_sec, $ts_usec, $status, $length, $len_cap,
$s, $interval, $start_frame, $xfer_flags, $ndesc, $rest) =
- unpack('a8CCCCSCCa8liIIa8llLLa*', $packet);
+ unpack('a8CCCCS<CCa8l<i<I<I<a8l<l<L<L<a*', $packet);
- # Try to grok quads. We may loose some address information with 32-bit
+ # Try to grok quads. We may lose some address information with 32-bit
# Perl parsing 64-bit captures, or timestamp after 2038. Still the best
# we can do.
eval {
- $id = unpack ('Q', $id);
- $ts_sec = unpack ('Q', $ts_sec);
+ $id = unpack ('Q<', $id);
+ $ts_sec = unpack ('Q<', $ts_sec);
};
if ($@) {
- ($id) = unpack ('LL', $id);
- ($ts_sec) = unpack ('LL', $ts_sec);
+ ($id) = unpack ('L<L<', $id);
+ ($ts_sec) = unpack ('L<L<', $ts_sec);
}
my $self = {
@@ -115,7 +118,7 @@ sub decode
if ($setup->{bmRequestType} & USB_TYPE_VENDOR) {
($setup->{wValue}, $setup->{wIndex},
- $setup->{wLength}) = unpack('S3', $rest);
+ $setup->{wLength}) = unpack('S<3', $rest);
} else {
# Unknown setup request;
$setup->{data} = $rest;
@@ -127,7 +130,7 @@ sub decode
# Isochronous descriptors
if ($self->{xfer_type} == USB_XFER_TYPE_ISO) {
my $iso = {};
- ($iso->{error_count}, $iso->{numdesc}) = unpack('ii', $s);
+ ($iso->{error_count}, $iso->{numdesc}) = unpack('i<i<', $s);
$self->{iso} = $iso;
}
@@ -147,11 +150,11 @@ __END__
=head1 NAME
-NetPacket::USBMon
+NetPacket::USBMon - Assemble and disassemble USB packets captured via Linux USBMon interface.
=head1 VERSION
-version 1.4.1
+version 1.4.4
=head1 SYNOPSIS
@@ -9,7 +9,7 @@ BEGIN {
$NetPacket::AUTHORITY = 'cpan:YANICK';
}
{
- $NetPacket::VERSION = '1.4.1';
+ $NetPacket::VERSION = '1.4.4';
}
# ABSTRACT: assemble/disassemble network packets at the protocol level
@@ -117,7 +117,7 @@ NetPacket - assemble/disassemble network packets at the protocol level
=head1 VERSION
-version 1.4.1
+version 1.4.4
=head1 SYNOPSIS
@@ -1,9 +1,9 @@
use strict;
use warnings;
-# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.020
+# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.033
-use Test::More 0.88;
+use Test::More tests => 9 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
@@ -19,28 +19,28 @@ my @module_files = (
'NetPacket/USBMon.pm'
);
-my @scripts = (
-);
# no fake home requested
+use File::Spec;
use IPC::Open3;
use IO::Handle;
-use File::Spec;
my @warnings;
for my $lib (@module_files)
{
- open my $stdout, '>', File::Spec->devnull or die $!;
- open my $stdin, '<', File::Spec->devnull or die $!;
+ # see L<perlfaq8/How can I capture STDERR from an external command?>
+ open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
my $stderr = IO::Handle->new;
- my $pid = open3($stdin, $stdout, $stderr, qq{$^X -Mblib -e"require q[$lib]"});
+ my $pid = open3($stdin, '>&STDERR', $stderr, $^X, '-Mblib', '-e', "require q[$lib]");
+ binmode $stderr, ':crlf' if $^O eq 'MSWin32';
+ my @_warnings = <$stderr>;
waitpid($pid, 0);
is($? >> 8, 0, "$lib loaded ok");
- if (my @_warnings = <$stderr>)
+ if (@_warnings)
{
warn @_warnings;
push @warnings, @_warnings;
@@ -52,5 +52,3 @@ for my $lib (@module_files)
is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING};
-
-done_testing;
@@ -13,7 +13,7 @@ my $v = "\nGenerated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.08\n";
eval { # no excuses!
# report our Perl details
- my $want = "any version";
+ my $want = 'v5.10.0';
$v .= "perl: $] (wanted $want) on $^O from $^X\n\n";
};
defined($@) and diag("$@");