Test-Bits-0.02/0000775000175000017500000000000012156435015013115 5ustar autarchautarchTest-Bits-0.02/MANIFEST0000644000175000017500000000045712156435015014252 0ustar autarchautarchChanges INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README dist.ini lib/Test/Bits.pm t/00-compile.t t/author-pod-spell.t t/bits_is.t t/release-cpan-changes.t t/release-eol.t t/release-no-tabs.t t/release-pod-coverage.t t/release-pod-linkcheck.t t/release-pod-no404s.t t/release-pod-syntax.t Test-Bits-0.02/t/0000775000175000017500000000000012156435015013360 5ustar autarchautarchTest-Bits-0.02/t/release-no-tabs.t0000644000175000017500000000045012156435015016523 0ustar autarchautarch BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; eval 'use Test::NoTabs'; plan skip_all => 'Test::NoTabs required' if $@; all_perl_files_ok(); Test-Bits-0.02/t/author-pod-spell.t0000644000175000017500000000075712156435015016753 0ustar autarchautarch BEGIN { unless ($ENV{AUTHOR_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for testing by the author'); } } use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006000 eval "use Test::Spelling 0.12; use Pod::Wordlist::hanekomu; 1" or die $@; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ bXXXXXXXX DROLSKY DROLSKY's Rolsky Rolsky's Dave autarch MaxMind Inc lib Test Bits Test-Bits-0.02/t/release-pod-linkcheck.t0000644000175000017500000000077512156435015017705 0ustar autarchautarch#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_LINKCHECK ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::LinkCheck"; if ( $@ ) { plan skip_all => 'Test::Pod::LinkCheck required for testing POD'; } else { Test::Pod::LinkCheck->new->all_pod_ok; } Test-Bits-0.02/t/release-eol.t0000644000175000017500000000047612156435015015747 0ustar autarchautarch BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; eval 'use Test::EOL'; plan skip_all => 'Test::EOL required' if $@; all_perl_files_ok({ trailing_whitespace => 1 }); Test-Bits-0.02/t/release-pod-syntax.t0000644000175000017500000000045012156435015017266 0ustar autarchautarch#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::Pod 1.41"; plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; all_pod_files_ok(); Test-Bits-0.02/t/00-compile.t0000644000175000017500000000312612156435015015412 0ustar autarchautarch#!perl use strict; use warnings; use Test::More; use File::Find; use File::Temp qw{ tempdir }; my @modules; find( sub { return if $File::Find::name !~ /\.pm\z/; my $found = $File::Find::name; $found =~ s{^lib/}{}; $found =~ s{[/\\]}{::}g; $found =~ s/\.pm$//; # nothing to skip push @modules, $found; }, 'lib', ); sub _find_scripts { my $dir = shift @_; my @found_scripts = (); find( sub { return unless -f; my $found = $File::Find::name; # nothing to skip open my $FH, '<', $_ or do { note( "Unable to open $found in ( $! ), skipping" ); return; }; my $shebang = <$FH>; return unless $shebang =~ /^#!.*?\bperl\b\s*$/; push @found_scripts, $found; }, $dir, ); return @found_scripts; } my @scripts; do { push @scripts, _find_scripts($_) if -d $_ } for qw{ bin script scripts }; my $plan = scalar(@modules) + scalar(@scripts); $plan ? (plan tests => $plan) : (plan skip_all => "no tests to run"); { # fake home for cpan-testers # no fake requested ## local $ENV{HOME} = tempdir( CLEANUP => 1 ); like( qx{ $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" ) for sort @modules; SKIP: { eval "use Test::Script 1.05; 1;"; skip "Test::Script needed to test script compilation", scalar(@scripts) if $@; foreach my $file ( @scripts ) { my $script = $file; $script =~ s!.*/!!; script_compiles( $file, "$script script compiles" ); } } } Test-Bits-0.02/t/bits_is.t0000644000175000017500000001102012156435015015171 0ustar autarchautarchuse strict; use warnings; use Test::Tester; use Test::Fatal; use Test::More 0.88; use Test::Bits; _test_bits_is( 'x', [ ord('x') ], 'x == x', 1, ); _test_bits_is( 'xyz', [ map { ord($_) } qw( x y z ) ], 'xyz == xyz', 1, ); { my $diag = 'Binary data begins differing at byte 0.' . "\n" . ' Got: 01111001' . "\n" . ' Expect: 01111000' . "\n"; _test_bits_is( 'y', [ ord('x') ], 'y != x', 0, $diag, ); } { my $diag = 'Binary data begins differing at byte 2.' . "\n" . ' Got: 01111001' . "\n" . ' Expect: 01111010' . "\n"; _test_bits_is( 'xyy', [ map { ord($_) } qw( x y z ) ], 'xyy != xyz', 0, $diag, ); } { my $diag = 'The two pieces of binary data are not the same length (got 2, expected 3).' . "\n" . 'Binary data begins differing at byte 1.' . "\n" . ' Got: 01111000' . "\n" . ' Expect: 01111001' . "\n"; _test_bits_is( 'xx', [ map { ord($_) } qw( x y z ) ], 'xy != xyz', 0, $diag, ); } like( exception { bits_is( ['foo'], [42] ) }, qr{\Qbits_is() should be passed a scalar of binary data and an array reference of numbers. You passed a ARRAY reference as the first argument at t/bits_is.t line \E\d+}, 'got error passing an arrayref as first argument to bits_is()' ); like( exception { bits_is( undef, [42] ) }, qr{\Qbits_is() should be passed a scalar of binary data and an array reference of numbers. You passed an undef as the first argument at t/bits_is.t line \E\d+}, 'got error passing an undef as first argument to bits_is()' ); like( exception { bits_is( "\x{2048}", [42] ) }, qr{\Qbits_is() should be passed a scalar of binary data and an array reference of numbers. You passed a string with UTF-8 data as the first argument at t/bits_is.t line \E\d+}, 'got error passing an arrayref as first argument to bits_is()' ); like( exception { bits_is( 'foo', 'foo' ) }, qr{\Qbits_is() should be passed a scalar of binary data and an array reference of numbers. You passed a plain scalar as the second argument at t/bits_is.t line \E\d+}, 'got error passing a scalar as second argument to bits_is()' ); like( exception { bits_is( 'foo', {} ) }, qr{\Qbits_is() should be passed a scalar of binary data and an array reference of numbers. You passed a HASH reference as the second argument at t/bits_is.t line \E\d+}, 'got error passing a hashref as second argument to bits_is()' ); like( exception { bits_is( 'foo', undef ) }, qr{\Qbits_is() should be passed a scalar of binary data and an array reference of numbers. You passed an undef as the second argument at t/bits_is.t line \E\d+}, 'got error passing an undef as second argument to bits_is()' ); like( exception { bits_is( 'foo', [ 1, 2, undef ] ) }, qr{\Qbits_is() should be passed a scalar of binary data and an array reference of numbers. The second argument contains a value which isn't a number from 0-255 at t/bits_is.t line \E\d+}, 'got error passing an arrayref with an undef as second argument to bits_is()' ); like( exception { bits_is( 'foo', [ 1, 2, {} ] ) }, qr{\Qbits_is() should be passed a scalar of binary data and an array reference of numbers. The second argument contains a value which isn't a number from 0-255 at t/bits_is.t line \E\d+}, 'got error passing an arrayref with a hashref as second argument to bits_is()' ); like( exception { bits_is( 'foo', [ 1, 2, 9000 ] ) }, qr{\Qbits_is() should be passed a scalar of binary data and an array reference of numbers. The second argument contains a value which isn't a number from 0-255 at t/bits_is.t line \E\d+}, 'got error passing an arrayref with 9000 as second argument to bits_is()' ); like( exception { bits_is( 'foo', [ 1, 2, -5 ] ) }, qr{\Qbits_is() should be passed a scalar of binary data and an array reference of numbers. The second argument contains a value which isn't a number from 0-255 at t/bits_is.t line \E\d+}, 'got error passing an arrayref with -5 as second argument to bits_is()' ); done_testing(); sub _test_bits_is { my $got = shift; my $expect = shift; my $name = shift; my $ok = shift; my $diag = shift; check_test( sub { bits_is( $got, $expect, $name ) }, { ok => $ok, name => $name, diag => ( $diag || q{} ), }, $name ); } Test-Bits-0.02/t/release-pod-no404s.t0000644000175000017500000000076512156435015017000 0ustar autarchautarch#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_NO404S AUTOMATED_TESTING ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::No404s"; if ( $@ ) { plan skip_all => 'Test::Pod::No404s required for testing POD'; } else { all_pod_files_ok(); } Test-Bits-0.02/t/release-pod-coverage.t0000644000175000017500000000076512156435015017544 0ustar autarchautarch#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::Pod::Coverage 1.08"; plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" if $@; eval "use Pod::Coverage::TrustPod"; plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" if $@; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); Test-Bits-0.02/t/release-cpan-changes.t0000644000175000017500000000052112156435015017506 0ustar autarchautarch#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More 0.96 tests => 2; use_ok('Test::CPAN::Changes'); subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; done_testing(); Test-Bits-0.02/lib/0000775000175000017500000000000012156435015013663 5ustar autarchautarchTest-Bits-0.02/lib/Test/0000775000175000017500000000000012156435015014602 5ustar autarchautarchTest-Bits-0.02/lib/Test/Bits.pm0000644000175000017500000001241212156435015016037 0ustar autarchautarchpackage Test::Bits; { $Test::Bits::VERSION = '0.02'; } BEGIN { $Test::Bits::AUTHORITY = 'cpan:DROLSKY'; } use strict; use warnings; use List::AllUtils qw( all any min ); use Scalar::Util qw( blessed reftype ); use parent qw( Test::Builder::Module ); our @EXPORT = qw( bits_is ); our $Builder; my $UsageErrorBase = 'bits_is() should be passed a scalar of binary data and an array reference of numbers.'; sub bits_is ($$;$) { my $got = shift; my $expect = shift; my $name = shift; local $Builder = __PACKAGE__->builder(); _check_got($got); _check_expect($expect); $got = [ map { ord($_) } split //, $got ]; my $got_length = @{$got}; my $expect_length = @{$expect}; my @errors; push @errors, 'The two pieces of binary data are not the same length' . " (got $got_length, expected $expect_length)." unless $got_length eq $expect_length; my $length = min( $got_length, $expect_length ); for my $i ( 0 .. $length - 1 ) { next if $got->[$i] == $expect->[$i]; push @errors, sprintf( "Binary data begins differing at byte $i.\n" . " Got: %08b\n" . " Expect: %08b", $got->[$i], $expect->[$i], ); last; } if (@errors) { $Builder->ok( 0, $name ); $Builder->diag( join "\n", @errors ); } else { $Builder->ok( 1, $name ); } return; } sub _check_got { my $got = shift; local $Test::Builder::Level = $Test::Builder::Level + 1; my $error; if ( !defined $got ) { $error = $UsageErrorBase . ' You passed an undef as the first argument'; } elsif ( ref $got ) { $error = $UsageErrorBase . ' You passed a ' . reftype($got) . ' reference as the first argument'; } else { if ( any { ord($_) > 255 } split //, $got ) { $error = $UsageErrorBase . ' You passed a string with UTF-8 data as the first argument'; } } $Builder->croak($error) if $error; } sub _check_expect { my $expect = shift; local $Test::Builder::Level = $Test::Builder::Level + 1; my $error; if ( !defined $expect ) { $error = $UsageErrorBase . ' You passed an undef as the second argument'; } elsif ( !ref $expect ) { $error = $UsageErrorBase . ' You passed a plain scalar as the second argument'; } elsif ( reftype($expect) eq 'ARRAY' ) { unless ( all { defined $_ && !ref $_ && $_ =~ /^\d+$/ && $_ >= 0 && $_ <= 255; } @{$expect} ) { $error = $UsageErrorBase . q{ The second argument contains a value which isn't a number from 0-255}; } } else { $error = $UsageErrorBase . ' You passed a ' . reftype($expect) . ' reference as the second argument'; } $Builder->croak($error) if $error; } 1; # ABSTRACT: Provides a bits_is() subroutine for testing binary data __END__ =pod =head1 NAME Test::Bits - Provides a bits_is() subroutine for testing binary data =head1 VERSION version 0.02 =head1 SYNOPSIS use Test::Bits; bits_is( $binary_data, [ 0b0010101, 0b01111100 ], 'binary data contains expected values' ); =head1 DESCRIPTION This module provides a single subroutine, C, for testing binary data. This module is quite similar to L and L in concept. The difference is that this module shows failure diagnostics in a different way, and has a slightly different calling style. Depending on the nature of the data you're working with, this module may be easier to work with. In particular, when you're doing a lot of bit twiddling, this module's diagnostic output may make it easier to diagnose failures. A typical failure diagnostic will look like this: The two pieces of binary data are not the same length (got 2, expected 3). Binary data begins differing at byte 1. Got: 01111000 Expect: 01111001 Note that the bytes are numbered starting from 0 in the diagnostic output. =for Pod::Coverage bits_is =head1 USAGE The C subroutine takes two required arguments and an optional test name. The first argument should be a plain scalar containing I data. If it contains any UTF-8 characters an error will be thrown. The second argument should be an array reference of numbers from 0-255 representing the expected value of each byte in the first argument. This allows you write the numbers out in binary format (0bXXXXXXXX) for test cases if you wish to. =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 AUTHOR Dave Rolsky =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2013 by MaxMind, Inc.. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut Test-Bits-0.02/README0000644000175000017500000000041312156435015013771 0ustar autarchautarch This archive contains the distribution Test-Bits, version 0.02: Provides a bits_is() subroutine for testing binary data This software is Copyright (c) 2013 by MaxMind, Inc.. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) Test-Bits-0.02/LICENSE0000644000175000017500000002152212156435015014122 0ustar autarchautarchThis software is Copyright (c) 2013 by MaxMind, Inc.. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) The Artistic License 2.0 Copyright (c) 2000-2006, The Perl Foundation. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software. You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement. Definitions "Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package. "Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures. "You" and "your" means any person who would like to copy, distribute, or modify the Package. "Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. "Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. "Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees. "Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. "Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. "Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future. "Source" form means the source code, documentation source, and configuration files for the Package. "Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form. Permission for Use and Modification Without Distribution (1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. Permissions for Redistribution of the Standard Version (2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. (3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License. Distribution of Modified Versions of the Package as Source (4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following: (a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version. (b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version. (c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under (i) the Original License or (ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee received, and requires that the Source form of the Modified Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed. Distribution of Compiled Forms of the Standard Version or Modified Versions without the Source (5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license. (6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version. Aggregating or Linking the Package (7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation. (8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package. Items That are Not Considered Part of a Modified Version (9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license. General Provisions (10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. (11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license. (12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. (13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed. (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Test-Bits-0.02/META.yml0000644000175000017500000000147512156435015014373 0ustar autarchautarch--- abstract: 'Provides a bits_is() subroutine for testing binary data' author: - 'Dave Rolsky ' build_requires: File::Find: 0 File::Temp: 0 Test::Fatal: 0 Test::More: 0.88 Test::Tester: 0 configure_requires: ExtUtils::MakeMaker: 6.30 dynamic_config: 0 generated_by: 'Dist::Zilla version 4.300034, CPAN::Meta::Converter version 2.120921' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Test-Bits requires: List::AllUtils: 0 Scalar::Util: 0 Test::Builder::Module: 0 parent: 0 strict: 0 warnings: 0 resources: bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Bits homepage: http://metacpan.org/release/Test-Bits repository: git://git.urth.org/Test-Bits.git version: 0.02 x_authority: cpan:DROLSKY Test-Bits-0.02/Makefile.PL0000644000175000017500000000313212156435015015064 0ustar autarchautarch use strict; use warnings; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "Provides a bits_is() subroutine for testing binary data", "AUTHOR" => "Dave Rolsky ", "BUILD_REQUIRES" => {}, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30" }, "DISTNAME" => "Test-Bits", "EXE_FILES" => [], "LICENSE" => "artistic_2", "NAME" => "Test::Bits", "PREREQ_PM" => { "List::AllUtils" => 0, "Scalar::Util" => 0, "Test::Builder::Module" => 0, "parent" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "File::Find" => 0, "File::Temp" => 0, "Test::Fatal" => 0, "Test::More" => "0.88", "Test::Tester" => 0 }, "VERSION" => "0.02", "test" => { "TESTS" => "t/*.t" } ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { my $tr = delete $WriteMakefileArgs{TEST_REQUIRES}; my $br = $WriteMakefileArgs{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}; } } } unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; my $pp = $WriteMakefileArgs{PREREQ_PM}; for my $mod ( keys %$br ) { if ( exists $pp->{$mod} ) { $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; } else { $pp->{$mod} = $br->{$mod}; } } } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Test-Bits-0.02/Changes0000644000175000017500000000017712156435015014413 0ustar autarchautarch0.02 2013-06-13 - Fix the tests to pass with Perl 5.8. 0.01 2012-10-18 - First release upon an unsuspecting world. Test-Bits-0.02/META.json0000644000175000017500000000336512156435015014543 0ustar autarchautarch{ "abstract" : "Provides a bits_is() subroutine for testing binary data", "author" : [ "Dave Rolsky " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 4.300034, CPAN::Meta::Converter version 2.120921", "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Test-Bits", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30" } }, "develop" : { "requires" : { "Pod::Coverage::TrustPod" : "0", "Test::CPAN::Changes" : "0.19", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08" } }, "runtime" : { "requires" : { "List::AllUtils" : "0", "Scalar::Util" : "0", "Test::Builder::Module" : "0", "parent" : "0", "strict" : "0", "warnings" : "0" } }, "test" : { "requires" : { "File::Find" : "0", "File::Temp" : "0", "Test::Fatal" : "0", "Test::More" : "0.88", "Test::Tester" : "0" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-test-bits@rt.cpan.org", "web" : "http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Bits" }, "homepage" : "http://metacpan.org/release/Test-Bits", "repository" : { "type" : "git", "url" : "git://git.urth.org/Test-Bits.git", "web" : "http://git.urth.org/Test-Bits.git" } }, "version" : "0.02", "x_authority" : "cpan:DROLSKY" } Test-Bits-0.02/INSTALL0000644000175000017500000000164512156435015014152 0ustar autarchautarch This is the Perl distribution Test-Bits. Installing Test-Bits is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm Test::Bits If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S Test::Bits ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan Test::Bits ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Makefile.PL % make && make test Then install it: % make install If you are installing into a system-wide directory, you may need to run: % sudo make install ## Documentation Test-Bits documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc Test::Bits Test-Bits-0.02/dist.ini0000644000175000017500000000027012156435015014556 0ustar autarchautarchname = Test-Bits author = Dave Rolsky license = Artistic_2_0 copyright_holder = MaxMind, Inc. version = 0.02 [@DROLSKY] dist = Test-Bits stopwords = bXXXXXXXX