MaxMind-DB-Common-0.040001/0000775000175000017500000000000012654160756013454 5ustar greggregMaxMind-DB-Common-0.040001/LICENSE0000644000175000017500000002152212654160756014461 0ustar greggregThis software is Copyright (c) 2016 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. MaxMind-DB-Common-0.040001/INSTALL0000644000175000017500000000174012654160756014505 0ustar greggregThis is the Perl distribution MaxMind-DB-Common. Installing MaxMind-DB-Common is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm MaxMind::DB::Common 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 MaxMind::DB::Common ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan MaxMind::DB::Common ## 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 MaxMind-DB-Common documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc MaxMind::DB::Common MaxMind-DB-Common-0.040001/Makefile.PL0000644000175000017500000000366512654160756015436 0ustar greggreg# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.043. use strict; use warnings; use 5.008; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Code shared by the MaxMind DB reader and writer modules", "AUTHOR" => "Dave Rolsky , Olaf Alders ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "MaxMind-DB-Common", "LICENSE" => "artistic_2", "MIN_PERL_VERSION" => "5.008", "NAME" => "MaxMind::DB::Common", "PREREQ_PM" => { "Carp" => 0, "Data::Dumper::Concise" => 0, "DateTime" => 0, "Exporter" => 0, "List::AllUtils" => 0, "Math::BigInt" => 0, "Moo" => 0, "Moo::Role" => 0, "MooX::StrictConstructor" => 0, "Scalar::Util" => 0, "Sub::Quote" => 0, "autodie" => 0, "constant" => 0, "namespace::autoclean" => 0, "overload" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "Test::More" => "0.96" }, "VERSION" => "0.040001", "test" => { "TESTS" => "t/*.t t/MaxMind/DB/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "Data::Dumper::Concise" => 0, "DateTime" => 0, "Exporter" => 0, "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "List::AllUtils" => 0, "Math::BigInt" => 0, "Moo" => 0, "Moo::Role" => 0, "MooX::StrictConstructor" => 0, "Scalar::Util" => 0, "Sub::Quote" => 0, "Test::More" => "0.96", "autodie" => 0, "constant" => 0, "namespace::autoclean" => 0, "overload" => 0, "strict" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); MaxMind-DB-Common-0.040001/dist.ini0000644000175000017500000000065412654160756015123 0ustar greggregname = MaxMind-DB-Common author = Dave Rolsky author = Olaf Alders license = Artistic_2_0 copyright_holder = MaxMind, Inc. [@MAXMIND] dist = MaxMind-DB-Common stopwords = API stopwords = GitHub stopwords = IP stopwords = VERSIONING stopwords = YYY stopwords = YYYZZZ stopwords = metadata stopwords = timestamp stopwords = versioning -remove = Test::Pod::Coverage::Configurable MaxMind-DB-Common-0.040001/perltidyrc0000644000175000017500000000033012654160756015552 0ustar greggreg--blank-lines-before-packages=0 --iterations=2 --no-outdent-long-comments -b -bar -boc -ci=4 -i=4 -l=78 -nolq -se -wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" MaxMind-DB-Common-0.040001/lib/0000775000175000017500000000000012654160756014222 5ustar greggregMaxMind-DB-Common-0.040001/lib/MaxMind/0000775000175000017500000000000012654160756015557 5ustar greggregMaxMind-DB-Common-0.040001/lib/MaxMind/DB/0000775000175000017500000000000012654160756016044 5ustar greggregMaxMind-DB-Common-0.040001/lib/MaxMind/DB/Types.pm0000644000175000017500000000623012654160756017505 0ustar greggregpackage MaxMind::DB::Types; use strict; use warnings; our $VERSION = '0.040001'; use Carp qw( confess ); use Exporter qw( import ); use List::AllUtils; use Scalar::Util (); use Sub::Quote qw( quote_sub ); use overload (); our @EXPORT_OK = qw( ArrayRefOfStr Bool Decoder Epoch FileHandle HashRef HashRefOfStr Int Metadata Str ); ## no critic (NamingConventions::Capitalization, ValuesAndExpressions::ProhibitImplicitNewlines) { my $t = quote_sub( q{ ( defined $_[0] && Scalar::Util::reftype( $_[0] ) eq 'ARRAY' && List::AllUtils::all( sub { defined $_ && !ref $_ }, @{ $_[0] } ) ) or MaxMind::DB::Types::_confess( '%s is not an arrayref', $_[0] ); } ); sub ArrayRefOfStr () { $t } } { my $t = quote_sub( q{ ( !defined $_[0] || $_[0] eq q{} || "$_[0]" eq '1' || "$_[0]" eq '0' ) or MaxMind::DB::Types::_confess( '%s is not a boolean', $_[0] ); } ); sub Bool () { $t } } { my $t = _object_isa_type('MaxMind::DB::Reader::Decoder'); sub Decoder () { $t } } { my $t = quote_sub( q{ ( defined $_[0] && ( ( !ref $_[0] && $_[0] =~ /^[0-9]+$/ ) || ( Scalar::Util::blessed( $_[0] ) && ( $_[0]->isa('Math::UInt128') || $_[0]->isa('Math::BigInt') ) ) ) ) or MaxMind::DB::Types::_confess( '%s is not an integer, a Math::UInt128 object, or a Math::BigInt object', $_[0] ); } ); sub Epoch () { $t } sub Int () { $t } } { my $t = quote_sub( q{ ( ( defined $_[0] && Scalar::Util::openhandle( $_[0] ) ) || ( Scalar::Util::blessed( $_[0] ) && $_[0]->isa('IO::Handle') ) ) or MaxMind::DB::Types::_confess( '%s is not a file handle', $_[0] ); } ); sub FileHandle () { $t } } { my $t = quote_sub( q{ ( defined $_[0] && Scalar::Util::reftype( $_[0] ) eq 'HASH' ) or MaxMind::DB::Types::_confess( '%s is not a hashref', $_[0] ); } ); sub HashRef () { $t } } { my $t = quote_sub( q{ ( defined $_[0] && Scalar::Util::reftype( $_[0] ) eq 'HASH' && &List::AllUtils::all( sub { defined $_ && !ref $_ }, values %{ $_[0] } ) ) or MaxMind::DB::Types::_confess( '%s is not a hashref of strings', $_[0] ); } ); sub HashRefOfStr () { $t } } { my $t = _object_isa_type('MaxMind::DB::Metadata'); sub Metadata () { $t } } { my $t = quote_sub( q{ ( defined $_[0] && !ref $_[0] ) or MaxMind::DB::Types::_confess( '%s is not a string', $_[0] ); } ); sub Str () { $t } } sub _object_isa_type { my $class = shift; return quote_sub( qq{ ( Scalar::Util::blessed( \$_[0] ) && \$_[0]->isa('$class') ) or MaxMind::DB::Types::_confess( '%s is not a $class object', \$_[0] ); } ); } ## use critic ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) sub _confess { ## no critic (Subroutines::ProhibitCallsToUnexportedSubs) confess sprintf( $_[0], defined $_[1] ? overload::StrVal( $_[1] ) : 'undef' ); } ## use critic 1; MaxMind-DB-Common-0.040001/lib/MaxMind/DB/Common.pm0000644000175000017500000000432412654160756017633 0ustar greggregpackage MaxMind::DB::Common; use strict; use warnings; our $VERSION = '0.040001'; my $separator_size; BEGIN { $separator_size = 16; } use constant { LEFT_RECORD => 0, RIGHT_RECORD => 1, DATA_SECTION_SEPARATOR_SIZE => $separator_size, DATA_SECTION_SEPARATOR => ( "\0" x $separator_size ), METADATA_MARKER => "\xab\xcd\xefMaxMind.com", }; use Exporter qw( import ); ## no critic (Variables::ProhibitPackageVars) our %TypeNumToName = ( 0 => 'extended', 1 => 'pointer', 2 => 'utf8_string', 3 => 'double', 4 => 'bytes', 5 => 'uint16', 6 => 'uint32', 7 => 'map', 8 => 'int32', 9 => 'uint64', 10 => 'uint128', 11 => 'array', 12 => 'container', 13 => 'end_marker', 14 => 'boolean', 15 => 'float', ); our %TypeNameToNum = reverse %TypeNumToName; our @EXPORT_OK = qw( LEFT_RECORD RIGHT_RECORD DATA_SECTION_SEPARATOR_SIZE DATA_SECTION_SEPARATOR METADATA_MARKER %TypeNumToName %TypeNameToNum ); 1; # ABSTRACT: Code shared by the MaxMind DB reader and writer modules __END__ =pod =head1 NAME MaxMind::DB::Common - Code shared by the MaxMind DB reader and writer modules =head1 VERSION version 0.040001 =head1 DESCRIPTION This distribution provides some shared code for use by both the MaxMind DB reader and writer Perl modules. For now, the only piece documented for public consumption is L. =head1 VERSIONING POLICY This module uses semantic versioning as described by L. Version numbers can be read as X.YYYZZZ, where X is the major number, YYY is the minor number, and ZZZ is the patch number. =head1 SUPPORT Please report all issues with this code using the GitHub issue tracker at L. =head1 AUTHORS =over 4 =item * Dave Rolsky =item * Olaf Alders =back =head1 CONTRIBUTOR =for stopwords Greg Oschwald Greg Oschwald =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2016 by MaxMind, Inc.. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut MaxMind-DB-Common-0.040001/lib/MaxMind/DB/Metadata.pm0000644000175000017500000001027412654160756020124 0ustar greggregpackage MaxMind::DB::Metadata; use strict; use warnings; use namespace::autoclean; our $VERSION = '0.040001'; use Moo; use MaxMind::DB::Types qw( ArrayRefOfStr Epoch HashRefOfStr Int Str ); use MooX::StrictConstructor; with 'MaxMind::DB::Role::Debugs'; { my %metadata = ( binary_format_major_version => Int, binary_format_minor_version => Int, build_epoch => Epoch, database_type => Str, description => HashRefOfStr, ip_version => Int, node_count => Int, record_size => Int, ); for my $attr ( keys %metadata ) { has $attr => ( is => 'ro', isa => $metadata{$attr}, required => 1, ); } } has languages => ( is => 'ro', isa => ArrayRefOfStr, default => sub { [] }, ); sub metadata_to_encode { my $self = shift; my %metadata; foreach my $attr ( $self->meta()->get_all_attributes() ) { my $method = $attr->name; $metadata{$method} = $self->$method; } return \%metadata; } sub debug_dump { my $self = shift; $self->_debug_newline(); $self->_debug_message('Metadata:'); my $version = join '.', $self->binary_format_major_version(), $self->binary_format_minor_version(); $self->_debug_string( ' Binary format version', $version ); require DateTime; $self->_debug_string( ' Build epoch', $self->build_epoch() . ' (' . DateTime->from_epoch( epoch => $self->build_epoch() ) . ')' ); $self->_debug_string( ' Database type', $self->database_type() ); my $description = $self->description(); for my $locale ( sort keys %{$description} ) { $self->_debug_string( " Description [$locale]", $description->{$locale} ); } $self->_debug_string( ' IP version', $self->ip_version() ); $self->_debug_string( ' Node count', $self->node_count() ); $self->_debug_string( ' Record size (in bits)', $self->record_size() ); $self->_debug_string( ' Languages', join ', ', @{ $self->languages() } ); return; } __PACKAGE__->meta()->make_immutable(); 1; #ABSTRACT: A class for metadata related to a MaxMind DB database __END__ =pod =head1 NAME MaxMind::DB::Metadata - A class for metadata related to a MaxMind DB database =head1 VERSION version 0.040001 =head1 SYNOPSIS my $reader = MaxMind::DB::Reader->new( file => $path ); my $metadata = $reader->metadata(); print $metadata->description()->{en}; =head1 DESCRIPTION This class provides an API for representing the metadata of a MaxMind DB database. See http://maxmind.github.io/MaxMind-DB/ for the official format spec. =for test_synopsis my $path; =head1 API This class provides methods for each metadata attribute in a database. =head2 $metadata->binary_format_major_version() Returns the binary format major version number. =head2 $metadata->binary_format_minor_version() Returns the binary format minor version number. =head2 $metadata->build_epoch() Returns the database's build timestamp as an epoch value. =head2 $metadata->database_type() Returns a string indicating the database's type. =head2 $metadata->languages() Returns an arrayref of locale codes indicating what languages this database has information for. =head2 $metadata->description() Returns a hashref of descriptions. The keys should be locale codes like "en" or "pt-BR" and the values are the description in that language. =head2 $metadata->ip_version() Returns a 4 or 6 indicating what type of IP addresses this database can be used to look up. =head2 $metadata->node_count() Returns the number of nodes in the database's search tree. =head2 $metadata->record_size() Returns the record size for nodes in the database's search tree. =head1 AUTHORS =over 4 =item * Dave Rolsky =item * Olaf Alders =back =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2016 by MaxMind, Inc.. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut MaxMind-DB-Common-0.040001/lib/MaxMind/DB/Role/0000775000175000017500000000000012654160756016745 5ustar greggregMaxMind-DB-Common-0.040001/lib/MaxMind/DB/Role/Debugs.pm0000644000175000017500000000215512654160756020515 0ustar greggregpackage MaxMind::DB::Role::Debugs; use strict; use warnings; use namespace::autoclean; use autodie; our $VERSION = '0.040001'; use Moo::Role; sub _debug_newline { warn "\n"; } sub _debug_binary { my $self = shift; my $label = shift; my $binary = shift; my $msg = "$label: "; if ( defined $binary ) { $msg .= join q{ }, map { sprintf( '%08b', ord($_) ) } split //, $binary; } else { $msg .= ''; } warn "$msg\n"; } sub _debug_string { my $self = shift; my $label = shift; my $string = shift; $string = '' unless defined $string; warn "$label: $string\n"; } sub _debug_sprintf { my $self = shift; warn sprintf( shift() . "\n", @_ ); } sub _debug_structure { my $self = shift; my $label = shift; my $structure = shift; require Data::Dumper::Concise; warn "$label: \n"; my $dumped = Data::Dumper::Concise::Dumper($structure); $dumped =~ s/^/ /mg; warn $dumped; } sub _debug_message { my $self = shift; my $msg = shift; warn "$msg\n"; } 1; MaxMind-DB-Common-0.040001/lib/Test/0000775000175000017500000000000012654160756015141 5ustar greggregMaxMind-DB-Common-0.040001/lib/Test/MaxMind/0000775000175000017500000000000012654160756016476 5ustar greggregMaxMind-DB-Common-0.040001/lib/Test/MaxMind/DB/0000775000175000017500000000000012654160756016763 5ustar greggregMaxMind-DB-Common-0.040001/lib/Test/MaxMind/DB/Common/0000775000175000017500000000000012654160756020213 5ustar greggregMaxMind-DB-Common-0.040001/lib/Test/MaxMind/DB/Common/Data.pm0000644000175000017500000003432412654160756021426 0ustar greggregpackage Test::MaxMind::DB::Common::Data; use strict; use warnings; our $VERSION = '0.040001'; use Exporter qw( import ); use Math::BigInt (); our @EXPORT_OK = qw( test_cases_for ); sub test_cases_for { my $type = shift; my $method = '_' . $type; return __PACKAGE__->$method(@_); } ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) sub _array { my @one_value = ( ['Foo'] => [ 0b00000001, 0b00000100, ( # Foo 0b01000011, 0b01000110, 0b01101111, 0b01101111 ) ], ); my @two_values = ( [ 'Foo', "\x{4eba}", ] => [ 0b00000010, 0b00000100, ( # Foo 0b01000011, 0b01000110, 0b01101111, 0b01101111 ), ( # \x{4eba} 0b01000011, 0b11100100, 0b10111010, 0b10111010 ), ], ); return [ [] => [ 0b00000000, 0b00000100 ], @one_value, @two_values, ]; } sub _bytes { my @bytes = ( q{} => [0b10000000], '1' => [ 0b10000001, ord('1') ], '123' => [ 0b10000011, map { ord($_) } qw( 1 2 3 ) ], '123456789012345678901234567' => [ 0b10011011, map { ord($_) } qw( 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 ) ], '1234567890123456789012345678' => [ 0b10011100, map { ord($_) } qw( 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 ) ], '12345678901234567890123456789' => [ 0b10011101, 0b00000000, map { ord($_) } qw( 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 ) ], '123456789012345678901234567890' => [ 0b10011101, 0b00000001, map { ord($_) } qw( 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 ) ], ); my $bytes_500 = 'x' x 500; push @bytes, $bytes_500 => [ 0b10011110, 0b00000000, 0b11010111, map { ord($_) } split //, $bytes_500 ]; my $bytes_2000 = 'x' x 2000; push @bytes, $bytes_2000 => [ 0b10011110, 0b00000110, 0b10110011, map { ord($_) } split //, $bytes_2000 ]; my $bytes_70000 = 'x' x 70000; push @bytes, $bytes_70000 => [ 0b10011111, 0b00000000, 0b00010000, 0b01010011, map { ord($_) } split //, $bytes_70000 ]; return \@bytes; } sub _double { return [ 0.0 => [ 0b01101000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 ], 0.5 => [ 0b01101000, 0b00111111, 0b11100000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 ], 3.14159265359 => [ 0b01101000, 0b01000000, 0b00001001, 0b00100001, 0b11111011, 0b01010100, 0b01000100, 0b00101110, 0b11101010 ], 123 => [ 0b01101000, 0b01000000, 0b01011110, 0b11000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 ], 1073741824.12457 => [ 0b01101000, 0b01000001, 0b11010000, 0b00000000, 0b00000000, 0b00000000, 0b00000111, 0b11111000, 0b11110100 ], -0.5 => [ 0b01101000, 0b10111111, 0b11100000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 ], -3.14159265359 => [ 0b01101000, 0b11000000, 0b00001001, 0b00100001, 0b11111011, 0b01010100, 0b01000100, 0b00101110, 0b11101010 ], -1073741824.12457 => [ 0b01101000, 0b11000001, 0b11010000, 0b00000000, 0b00000000, 0b00000000, 0b00000111, 0b11111000, 0b11110100 ], ]; } sub _float { return [ 0.0 => [ 0b00000100, 0b00001000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 ], 1.0 => [ 0b00000100, 0b00001000, 0b00111111, 0b10000000, 0b00000000, 0b00000000 ], 1.1 => [ 0b00000100, 0b00001000, 0b00111111, 0b10001100, 0b11001100, 0b11001101 ], 3.14 => [ 0b00000100, 0b00001000, 0b01000000, 0b01001000, 0b11110101, 0b11000011 ], 9999.99 => [ 0b00000100, 0b00001000, 0b01000110, 0b00011100, 0b00111111, 0b11110110 ], -1.0 => [ 0b00000100, 0b00001000, 0b10111111, 0b10000000, 0b00000000, 0b00000000 ], -1.1 => [ 0b00000100, 0b00001000, 0b10111111, 0b10001100, 0b11001100, 0b11001101 ], -3.14 => [ 0b00000100, 0b00001000, 0b11000000, 0b01001000, 0b11110101, 0b11000011 ], -9999.99 => [ 0b00000100, 0b00001000, 0b11000110, 0b00011100, 0b00111111, 0b11110110 ], ]; } sub _int32 { my $max = 2**31 - 1; return [ 0 => [ 0b00000000, 0b00000001 ], -1 => [ 0b00000100, 0b00000001, 0b11111111, 0b11111111, 0b11111111, 0b11111111 ], ( 2**8 - 1 ) => [ 0b00000001, 0b00000001, 0b11111111, ], -1 * ( 2**8 - 1 ) => [ 0b00000100, 0b00000001, 0b11111111, 0b11111111, 0b11111111, 0b00000001, ], 500 => [ 0b00000010, 0b00000001, 0b00000001, 0b11110100 ], -500 => [ 0b00000100, 0b00000001, 0b11111111, 0b11111111, 0b11111110, 0b00001100, ], ( 2**16 - 1 ) => [ 0b00000010, 0b00000001, 0b11111111, 0b11111111 ], -1 * ( 2**16 - 1 ) => [ 0b00000100, 0b00000001, 0b11111111, 0b11111111, 0b00000000, 0b00000001, ], ( 2**24 - 1 ) => [ 0b00000011, 0b00000001, 0b11111111, 0b11111111, 0b11111111 ], -1 * ( 2**24 - 1 ) => [ 0b00000100, 0b00000001, 0b11111111, 0b00000000, 0b00000000, 0b00000001, ], $max => [ 0b00000100, 0b00000001, 0b01111111, 0b11111111, 0b11111111, 0b11111111 ], -1 * $max => [ 0b00000100, 0b00000001, 0b10000000, 0b00000000, 0b00000000, 0b00000001, ] ]; } sub _map { my @one_key = ( { 'en' => 'Foo' } => [ 0b11100001, ( # en 0b01000010, 0b01100101, 0b01101110 ), ( # Foo 0b01000011, 0b01000110, 0b01101111, 0b01101111 ) ], ); my @two_keys = ( { 'en' => 'Foo', 'zh' => "\x{4eba}", } => [ 0b11100010, ( # en 0b01000010, 0b01100101, 0b01101110 ), ( # Foo 0b01000011, 0b01000110, 0b01101111, 0b01101111 ), ( # zh 0b01000010, 0b01111010, 0b01101000 ), ( # \x{4eba} 0b01000011, 0b11100100, 0b10111010, 0b10111010 ), ], ); my @nested = ( { name => { en => 'Bar', zh => "\x{4ebb}" } } => [ 0b11100001, ( # name 0b01000100, 0b01101110, 0b01100001, 0b01101101, 0b01100101 ), 0b11100010, ( # en 0b01000010, 0b01100101, 0b01101110 ), ( # Bar 0b01000011, 0b01000010, 0b01100001, 0b01110010 ), ( # zh 0b01000010, 0b01111010, 0b01101000 ), ( # \x{4ebb} 0b01000011, 0b11100100, 0b10111010, 0b10111011 ), ], ); my @guess = ( { languages => [ 'en', 'zh' ], } => [ 0b11100001, ( # languages 0b01001001, 0b01101100, 0b01100001, 0b01101110, 0b01100111, 0b01110101, 0b01100001, 0b01100111, 0b01100101, 0b01110011 ), ( # array 0b00000010, 0b00000100, ( # en 0b01000010, 0b01100101, 0b01101110 ), ( # zh 0b01000010, 0b01111010, 0b01101000 ), ), ], ); return [ {} => [0b11100000], @one_key, @two_keys, @nested, @guess, ]; } sub _pointer { return [ 0 => [ 0b00100000, 0b00000000 ], 5 => [ 0b00100000, 0b00000101 ], 10 => [ 0b00100000, 0b00001010 ], ( 2**10 ) - 1 => [ 0b00100011, 0b11111111, ], 3017 => [ 0b00101000, 0b00000011, 0b11001001 ], 2**19 - 5 => [ 0b00101111, 0b11110111, 0b11111011 ], ( 2**19 + 2**11 ) - 1 => [ 0b00101111, 0b11111111, 0b11111111 ], 2**27 - 2 => [ 0b00110111, 0b11110111, 0b11110111, 0b11111110 ], ( 2**27 + 2**19 + 2**11 ) - 1 => [ 0b00110111, 0b11111111, 0b11111111, 0b11111111 ], ( 2**32 - 1 ) => [ 0b00111000, 0b11111111, 0b11111111, 0b11111111, 0b11111111 ], ]; } sub _uint128 { my @uint128 = ( Math::BigInt->bzero() => [ 0b00000000, 0b00000011 ], Math::BigInt->new(500) => [ 0b00000010, 0b00000011, 0b00000001, 0b11110100 ], Math::BigInt->new(10872) => [ 0b00000010, 0b00000011, 0b00101010, 0b01111000 ], ); for my $power ( 1 .. 16 ) { my $key = Math::BigInt->new(2)**( 8 * $power ) - Math::BigInt->bone(); my $value = [ $power, 0b00000011, (0b11111111) x $power ]; push @uint128, $key => $value; } return \@uint128; } sub _uint64 { my @uint64 = ( Math::BigInt->bzero() => [ 0b00000000, 0b00000010 ], Math::BigInt->new(500) => [ 0b00000010, 0b00000010, 0b00000001, 0b11110100 ], Math::BigInt->new(10872) => [ 0b00000010, 0b00000010, 0b00101010, 0b01111000 ], ); for my $power ( 1 .. 8 ) { my $key = Math::BigInt->new(2)**( 8 * $power ) - Math::BigInt->bone(); my $value = [ $power, 0b00000010, (0b11111111) x $power ]; push @uint64, $key => $value; } return \@uint64; } sub _uint32 { my $max = 2**32 - 1; return [ 0 => [0b11000000], ( 2**8 - 1 ) => [ 0b11000001, 0b11111111, ], 500 => [ 0b11000010, 0b00000001, 0b11110100 ], 10872 => [ 0b11000010, 0b00101010, 0b01111000 ], ( 2**16 - 1 ) => [ 0b11000010, 0b11111111, 0b11111111 ], ( 2**24 - 1 ) => [ 0b11000011, 0b11111111, 0b11111111, 0b11111111 ], $max => [ 0b11000100, 0b11111111, 0b11111111, 0b11111111, 0b11111111 ], ]; } sub _uint16 { my $max = 2**16 - 1; return [ 0 => [0b10100000], ( 2**8 - 1 ) => [ 0b10100001, 0b11111111, ], 500 => [ 0b10100010, 0b00000001, 0b11110100 ], 10872 => [ 0b10100010, 0b00101010, 0b01111000 ], $max => [ 0b10100010, 0b11111111, 0b11111111, ], ]; } sub _utf8_string { shift; my %p = @_; my @string = ( q{} => [0b01000000], '1' => [ 0b01000001, ord('1') ], "\x{4eba}" => [ 0b01000011, 0b11100100, 0b10111010, 0b10111010 ], '123' => [ 0b01000011, map { ord($_) } qw( 1 2 3 ) ], '123456789012345678901234567' => [ 0b01011011, map { ord($_) } qw( 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 ) ], '1234567890123456789012345678' => [ 0b01011100, map { ord($_) } qw( 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 ) ], '12345678901234567890123456789' => [ 0b01011101, 0b00000000, map { ord($_) } qw( 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 ) ], '123456789012345678901234567890' => [ 0b01011101, 0b00000001, map { ord($_) } qw( 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 ) ], ); my $string_500 = 'x' x 500; push @string, $string_500 => [ 0b01011110, 0b00000000, 0b11010111, map { ord($_) } split //, $string_500 ]; my $string_2000 = 'x' x 2000; push @string, $string_2000 => [ 0b01011110, 0b00000110, 0b10110011, map { ord($_) } split //, $string_2000 ]; my $string_70000 = 'x' x 70000; push @string, $string_70000 => [ 0b01011111, 0b00000000, 0b00010000, 0b01010011, map { ord($_) } split //, $string_70000 ]; return \@string; } sub _boolean { return [ 0 => [ 0b00000000, 0b00000111, ], 1 => [ 0b00000001, 0b00000111, ], ]; } ## use critic 1; MaxMind-DB-Common-0.040001/lib/Test/MaxMind/DB/Common/Util.pm0000644000175000017500000000064212654160756021466 0ustar greggregpackage Test::MaxMind::DB::Common::Util; use strict; use warnings; our $VERSION = '0.040001'; use Exporter qw( import ); our @EXPORT_OK = qw( standard_test_metadata ); sub standard_test_metadata { return ( database_type => 'Test', languages => [ 'en', 'zh' ], description => { en => 'Test Database', zh => 'Test Database Chinese', }, ); } 1; MaxMind-DB-Common-0.040001/README.md0000644000175000017500000000214312654160756014731 0ustar greggreg# NAME MaxMind::DB::Common - Code shared by the MaxMind DB reader and writer modules # VERSION version 0.040001 # DESCRIPTION This distribution provides some shared code for use by both the MaxMind DB reader and writer Perl modules. For now, the only piece documented for public consumption is [MaxMind::DB::Metadata](https://metacpan.org/pod/MaxMind::DB::Metadata). # VERSIONING POLICY This module uses semantic versioning as described by [http://semver.org/](http://semver.org/). Version numbers can be read as X.YYYZZZ, where X is the major number, YYY is the minor number, and ZZZ is the patch number. # SUPPORT Please report all issues with this code using the GitHub issue tracker at [https://github.com/maxmind/MaxMind-DB-Common-perl/issues](https://github.com/maxmind/MaxMind-DB-Common-perl/issues). # AUTHORS - Dave Rolsky - Olaf Alders # CONTRIBUTOR Greg Oschwald # COPYRIGHT AND LICENSE This software is Copyright (c) 2016 by MaxMind, Inc.. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) MaxMind-DB-Common-0.040001/cpanfile0000644000175000017500000000264212654160756015162 0ustar greggregrequires "Carp" => "0"; requires "Data::Dumper::Concise" => "0"; requires "DateTime" => "0"; requires "Exporter" => "0"; requires "List::AllUtils" => "0"; requires "Math::BigInt" => "0"; requires "Moo" => "0"; requires "Moo::Role" => "0"; requires "MooX::StrictConstructor" => "0"; requires "Scalar::Util" => "0"; requires "Sub::Quote" => "0"; requires "autodie" => "0"; requires "constant" => "0"; requires "namespace::autoclean" => "0"; requires "overload" => "0"; requires "perl" => "5.008"; requires "strict" => "0"; requires "warnings" => "0"; on 'test' => sub { requires "ExtUtils::MakeMaker" => "0"; requires "File::Spec" => "0"; requires "Test::More" => "0.96"; requires "perl" => "5.008"; }; on 'test' => sub { recommends "CPAN::Meta" => "2.120900"; }; on 'configure' => sub { requires "ExtUtils::MakeMaker" => "0"; requires "perl" => "5.008"; }; on 'develop' => sub { requires "Code::TidyAll" => "0.24"; requires "File::Spec" => "0"; requires "IO::Handle" => "0"; requires "IPC::Open3" => "0"; requires "Perl::Critic" => "1.123"; requires "Perl::Tidy" => "20140711"; requires "Test::CPAN::Changes" => "0.19"; requires "Test::Code::TidyAll" => "0.24"; requires "Test::EOL" => "0"; requires "Test::More" => "0.88"; requires "Test::NoTabs" => "0"; requires "Test::Pod" => "1.41"; requires "Test::Spelling" => "0.12"; requires "Test::Synopsis" => "0"; requires "Test::Version" => "1"; }; MaxMind-DB-Common-0.040001/META.json0000644000175000017500000006551512654160756015107 0ustar greggreg{ "abstract" : "Code shared by the MaxMind DB reader and writer modules", "author" : [ "Dave Rolsky ", "Olaf Alders " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.043, CPAN::Meta::Converter version 2.150005", "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "MaxMind-DB-Common", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0", "perl" : "5.008" } }, "develop" : { "requires" : { "Code::TidyAll" : "0.24", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Perl::Critic" : "1.123", "Perl::Tidy" : "20140711", "Test::CPAN::Changes" : "0.19", "Test::Code::TidyAll" : "0.24", "Test::EOL" : "0", "Test::More" : "0.88", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Spelling" : "0.12", "Test::Synopsis" : "0", "Test::Version" : "1" } }, "runtime" : { "requires" : { "Carp" : "0", "Data::Dumper::Concise" : "0", "DateTime" : "0", "Exporter" : "0", "List::AllUtils" : "0", "Math::BigInt" : "0", "Moo" : "0", "Moo::Role" : "0", "MooX::StrictConstructor" : "0", "Scalar::Util" : "0", "Sub::Quote" : "0", "autodie" : "0", "constant" : "0", "namespace::autoclean" : "0", "overload" : "0", "perl" : "5.008", "strict" : "0", "warnings" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "Test::More" : "0.96", "perl" : "5.008" } } }, "provides" : { "MaxMind::DB::Common" : { "file" : "lib/MaxMind/DB/Common.pm", "version" : "0.040001" }, "MaxMind::DB::Metadata" : { "file" : "lib/MaxMind/DB/Metadata.pm", "version" : "0.040001" }, "MaxMind::DB::Role::Debugs" : { "file" : "lib/MaxMind/DB/Role/Debugs.pm", "version" : "0.040001" }, "MaxMind::DB::Types" : { "file" : "lib/MaxMind/DB/Types.pm", "version" : "0.040001" }, "Test::MaxMind::DB::Common::Data" : { "file" : "lib/Test/MaxMind/DB/Common/Data.pm", "version" : "0.040001" }, "Test::MaxMind::DB::Common::Util" : { "file" : "lib/Test/MaxMind/DB/Common/Util.pm", "version" : "0.040001" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/maxmind/MaxMind-DB-Common-perl/issues" }, "homepage" : "http://metacpan.org/release/MaxMind-DB-Common/", "repository" : { "type" : "git", "url" : "git://github.com/maxmind/MaxMind-DB-Common-perl.git", "web" : "https://github.com/maxmind/MaxMind-DB-Common-perl" } }, "version" : "0.040001", "x_Dist_Zilla" : { "perl" : { "version" : "5.020002" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::MakeMaker", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@MAXMIND/MakeMaker", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@MAXMIND/Authority", "version" : "1.009" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@MAXMIND/AutoPrereqs", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", "name" : "@MAXMIND/CopyFilesFromBuild", "version" : "0.151680" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "LICENSE", "Makefile.PL", "README.md", "cpanfile" ], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "@MAXMIND/Git::GatherDir", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::GitHub::Meta", "name" : "@MAXMIND/GitHub::Meta", "version" : "0.42" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", "config" : { "Dist::Zilla::Plugin::GitHub::Update" : { "metacpan" : 1 } }, "name" : "@MAXMIND/GitHub::Update", "version" : "0.42" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@MAXMIND/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "5.043" } ] }, "Dist::Zilla::Role::MetaProvider::Provider" : { "inherit_missing" : "1", "inherit_version" : "1", "meta_noindex" : "1" } }, "name" : "@MAXMIND/MetaProvides::Package", "version" : "2.003001" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@MAXMIND/NextRelease", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "config" : { "Dist::Zilla::Plugin::Test::PodSpelling" : { "directories" : [], "spell_cmd" : "", "stopwords" : [ "API", "Alders", "Alders'", "Eilam", "Eilam's", "GitHub", "IP", "MaxMind", "MaxMind's", "Oschwald", "Oschwald's", "Rolsky", "Rolsky's", "VERSIONING", "YYY", "YYYZZZ", "metadata", "timestamp", "versioning" ], "wordlist" : "Pod::Wordlist" } }, "name" : "@MAXMIND/Test::PodSpelling", "version" : "2.007000" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@MAXMIND/Test::ReportPrereqs", "version" : "0.021" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "@MAXMIND/Test::More with subtest()", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@MAXMIND/Modules for use with tidyall", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 1, "check_all_prereqs" : 1, "modules" : [], "phase" : "release", "skip" : [ "Dist::Zilla::Plugin::MAXMIND::Contributors", "Dist::Zilla::Plugin::MAXMIND::License", "Dist::Zilla::Plugin::MAXMIND::Tidyall" ] } }, "name" : "@MAXMIND/stale modules, release", "version" : "0.047" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "name" : "@MAXMIND/ReadmeMarkdownInBuild", "version" : "0.150250" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "name" : "@MAXMIND/ReadmeMarkdownInRoot", "version" : "0.150250" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@MAXMIND/UploadToCPAN", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@MAXMIND/PruneCruft", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@MAXMIND/ManifestSkip", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@MAXMIND/MetaYAML", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@MAXMIND/License", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::ExtraTests", "name" : "@MAXMIND/ExtraTests", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@MAXMIND/ExecDir", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@MAXMIND/ShareDir", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@MAXMIND/Manifest", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::CheckVersionIncrement", "name" : "@MAXMIND/CheckVersionIncrement", "version" : "0.121750" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@MAXMIND/TestRelease", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@MAXMIND/ConfirmRelease", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@MAXMIND/CheckPrereqsIndexed", "version" : "0.017" }, { "class" : "Dist::Zilla::Plugin::CPANFile", "name" : "@MAXMIND/CPANFile", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "config" : { "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@MAXMIND/Git::CheckFor::CorrectBranch", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", "config" : { "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@MAXMIND/Git::CheckFor::MergeConflicts", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "include_authors" : 0, "include_releaser" : 1, "order_by" : "name", "paths" : [ "." ] } }, "name" : "@MAXMIND/Git::Contributors", "version" : "0.018" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "@MAXMIND/InstallGuide", "version" : "1.200006" }, { "class" : "Dist::Zilla::Plugin::MAXMIND::Contributors", "name" : "@MAXMIND/MAXMIND::Contributors", "version" : "0.12" }, { "class" : "Dist::Zilla::Plugin::MAXMIND::License", "name" : "@MAXMIND/MAXMIND::License", "version" : "0.12" }, { "class" : "Dist::Zilla::Plugin::MAXMIND::TidyAll", "name" : "@MAXMIND/MAXMIND::TidyAll", "version" : "0.12" }, { "class" : "Dist::Zilla::Plugin::Meta::Contributors", "name" : "@MAXMIND/Meta::Contributors", "version" : "0.002" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@MAXMIND/MetaConfig", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@MAXMIND/MetaJSON", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "@MAXMIND/MinimumPerl", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::RewriteVersion", "config" : { "Dist::Zilla::Plugin::RewriteVersion" : { "add_tarball_name" : 0, "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 0, "skip_version_provider" : 0 } }, "name" : "@MAXMIND/RewriteVersion", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::SurgicalPodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.012" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Name", "name" : "Name", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Version", "name" : "Version", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Region", "name" : "prelude", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "SYNOPSIS", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DESCRIPTION", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "Leftovers", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Region", "name" : "postlude", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "Authors", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "Contributors", "version" : "0.009" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "Legal", "version" : "4.012" } ] } }, "name" : "@MAXMIND/SurgicalPodWeaver", "version" : "0.0023" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@MAXMIND/PodSyntaxTests", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "name" : "@MAXMIND/Test::CPAN::Changes", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":InstallModules", ":ExecFiles", ":TestFiles" ], "trailing_whitespace" : "1" } }, "name" : "@MAXMIND/Test::EOL", "version" : "0.18" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "filename" : "xt/author/no-tabs.t", "finder" : [ ":InstallModules", ":ExecFiles", ":TestFiles" ] } }, "name" : "@MAXMIND/Test::NoTabs", "version" : "0.15" }, { "class" : "Dist::Zilla::Plugin::Test::Portability", "name" : "@MAXMIND/Test::Portability", "version" : "2.000006" }, { "class" : "Dist::Zilla::Plugin::Test::Synopsis", "name" : "@MAXMIND/Test::Synopsis", "version" : "2.000006" }, { "class" : "Dist::Zilla::Plugin::Test::TidyAll", "name" : "@MAXMIND/Test::TidyAll", "version" : "0.01" }, { "class" : "Dist::Zilla::Plugin::Test::Version", "name" : "@MAXMIND/Test::Version", "version" : "1.05" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : "0", "fail_on_warning" : "author", "fake_home" : 0, "filename" : "xt/author/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : 0, "phase" : "develop", "script_finder" : [ ":PerlExecFiles" ], "skips" : [] } }, "name" : "@MAXMIND/Test::Compile", "version" : "2.054" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ ".mailmap", "CONTRIBUTING.md", "Changes", "LICENSE", "Makefile.PL", "README.md", "cpanfile" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@MAXMIND/Git::Check", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "v%v%n%n%c" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ ".mailmap", "CONTRIBUTING.md", "Changes", "LICENSE", "Makefile.PL", "README.md", "cpanfile" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@MAXMIND/commit generated files", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "v0.040001", "tag_format" : "v%v", "tag_message" : "v%v" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@MAXMIND/Git::Tag", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@MAXMIND/Git::Push", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease", "config" : { "Dist::Zilla::Plugin::BumpVersionAfterRelease" : { "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 0, "munge_makefile_pl" : 1 } }, "name" : "@MAXMIND/BumpVersionAfterRelease", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "Bump version after release" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "dist.ini" ], "allow_dirty_match" : [ "(?^:.+)" ], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@MAXMIND/commit version bump", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@MAXMIND/push version bump", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "5.043" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@MAXMIND/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "5.043" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "5.043" } }, "x_authority" : "cpan:MAXMIND", "x_contributors" : [ "Greg Oschwald " ] } MaxMind-DB-Common-0.040001/perlcriticrc0000644000175000017500000000433012654160756016062 0ustar greggregseverity = 3 verbose = 11 theme = core + pbp + bugs + maintenance + cosmetic + complexity + security + tests + moose exclude = Subroutines::ProhibitCallsToUndeclaredSubs [BuiltinFunctions::ProhibitStringySplit] severity = 3 [CodeLayout::RequireTrailingCommas] severity = 3 [ControlStructures::ProhibitCStyleForLoops] severity = 3 [InputOutput::RequireCheckedSyscalls] functions = :builtins exclude_functions = sleep severity = 3 [Moose::RequireCleanNamespace] modules = Moose Moose::Role MooseX::Role::Parameterized Moose::Util::TypeConstraints cleaners = namespace::autoclean [NamingConventions::Capitalization] package_exemptions = [A-Z]\w+|minFraud file_lexical_variables = [A-Z]\w+|[^A-Z]+ global_variables = :starts_with_upper scoped_lexical_variables = [A-Z]\w+|[^A-Z]+ severity = 3 # Given our code base, leaving this at 5 would be a huge pain [Subroutines::ProhibitManyArgs] max_arguments = 10 [RegularExpressions::ProhibitComplexRegexes] max_characters = 200 [RegularExpressions::ProhibitUnusualDelimiters] severity = 3 [Subroutines::ProhibitUnusedPrivateSubroutines] private_name_regex = _(?!build)\w+ skip_when_using = Moo::Role Moose::Role MooseX::Role::Parameterized Role::Tiny Test::Class::Moose::Role [TestingAndDebugging::ProhibitNoWarnings] allow = redefine [ValuesAndExpressions::ProhibitEmptyQuotes] severity = 3 [ValuesAndExpressions::ProhibitInterpolationOfLiterals] severity = 3 [ValuesAndExpressions::RequireUpperCaseHeredocTerminator] severity = 3 [Variables::ProhibitPackageVars] add_packages = Test::Builder [TestingAndDebugging::RequireUseStrict] [TestingAndDebugging::RequireUseWarnings] [-ControlStructures::ProhibitCascadingIfElse] [-ErrorHandling::RequireCarping] [-InputOutput::RequireBriefOpen] [-ValuesAndExpressions::ProhibitConstantPragma] # No need for /xsm everywhere [-RegularExpressions::RequireDotMatchAnything] [-RegularExpressions::RequireExtendedFormatting] [-RegularExpressions::RequireLineBoundaryMatching] # http://stackoverflow.com/questions/2275317/why-does-perlcritic-dislike-using-shift-to-populate-subroutine-variables [-Subroutines::RequireArgUnpacking] [-Subroutines::RequireFinalReturn] # "use v5.14" is more readable than "use 5.014" [-ValuesAndExpressions::ProhibitVersionStrings] MaxMind-DB-Common-0.040001/Changes0000644000175000017500000000120612654160756014744 0ustar greggreg0.040001 2016-02-02 - Validation on the Int type used in the Metadata class has been loosened, which should fix MaxMind::DB::Reader test failures on some platforms. 0.040000 2015-04-29 - Use Math::BigInt rather than Math::Int128 as part of working towards making MaxMind::DB::Reader pure Perl. 0.031003 2014-03-10 - Added docs for MaxMind::DB::Metadata. - Added two more exported constants, DATA_SECTION_SEPARATOR and METADATA_MARKER. 0.031002 2013-07-18 - Changes to make code work with Perl 5.8.x. 0.031001 2013-07-16 - Fixed a test failure with Perl 5.10. 0.031000 2013-07-16 - First release upon an unsuspecting world. MaxMind-DB-Common-0.040001/META.yml0000644000175000017500000004207412654160756014732 0ustar greggreg--- abstract: 'Code shared by the MaxMind DB reader and writer modules' author: - 'Dave Rolsky ' - 'Olaf Alders ' build_requires: ExtUtils::MakeMaker: '0' File::Spec: '0' Test::More: '0.96' perl: '5.008' configure_requires: ExtUtils::MakeMaker: '0' perl: '5.008' dynamic_config: 0 generated_by: 'Dist::Zilla version 5.043, CPAN::Meta::Converter version 2.150005' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: MaxMind-DB-Common provides: MaxMind::DB::Common: file: lib/MaxMind/DB/Common.pm version: '0.040001' MaxMind::DB::Metadata: file: lib/MaxMind/DB/Metadata.pm version: '0.040001' MaxMind::DB::Role::Debugs: file: lib/MaxMind/DB/Role/Debugs.pm version: '0.040001' MaxMind::DB::Types: file: lib/MaxMind/DB/Types.pm version: '0.040001' Test::MaxMind::DB::Common::Data: file: lib/Test/MaxMind/DB/Common/Data.pm version: '0.040001' Test::MaxMind::DB::Common::Util: file: lib/Test/MaxMind/DB/Common/Util.pm version: '0.040001' requires: Carp: '0' Data::Dumper::Concise: '0' DateTime: '0' Exporter: '0' List::AllUtils: '0' Math::BigInt: '0' Moo: '0' Moo::Role: '0' MooX::StrictConstructor: '0' Scalar::Util: '0' Sub::Quote: '0' autodie: '0' constant: '0' namespace::autoclean: '0' overload: '0' perl: '5.008' strict: '0' warnings: '0' resources: bugtracker: https://github.com/maxmind/MaxMind-DB-Common-perl/issues homepage: http://metacpan.org/release/MaxMind-DB-Common/ repository: git://github.com/maxmind/MaxMind-DB-Common-perl.git version: '0.040001' x_Dist_Zilla: perl: version: '5.020002' plugins: - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@MAXMIND/MakeMaker' version: '5.043' - class: Dist::Zilla::Plugin::Authority name: '@MAXMIND/Authority' version: '1.009' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@MAXMIND/AutoPrereqs' version: '5.043' - class: Dist::Zilla::Plugin::CopyFilesFromBuild name: '@MAXMIND/CopyFilesFromBuild' version: '0.151680' - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - LICENSE - Makefile.PL - README.md - cpanfile exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: '@MAXMIND/Git::GatherDir' version: '2.036' - class: Dist::Zilla::Plugin::GitHub::Meta name: '@MAXMIND/GitHub::Meta' version: '0.42' - class: Dist::Zilla::Plugin::GitHub::Update config: Dist::Zilla::Plugin::GitHub::Update: metacpan: 1 name: '@MAXMIND/GitHub::Update' version: '0.42' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: '@MAXMIND/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '5.043' Dist::Zilla::Role::MetaProvider::Provider: inherit_missing: '1' inherit_version: '1' meta_noindex: '1' name: '@MAXMIND/MetaProvides::Package' version: '2.003001' - class: Dist::Zilla::Plugin::NextRelease name: '@MAXMIND/NextRelease' version: '5.043' - class: Dist::Zilla::Plugin::Test::PodSpelling config: Dist::Zilla::Plugin::Test::PodSpelling: directories: [] spell_cmd: '' stopwords: - API - Alders - "Alders'" - Eilam - "Eilam's" - GitHub - IP - MaxMind - "MaxMind's" - Oschwald - "Oschwald's" - Rolsky - "Rolsky's" - VERSIONING - YYY - YYYZZZ - metadata - timestamp - versioning wordlist: Pod::Wordlist name: '@MAXMIND/Test::PodSpelling' version: '2.007000' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@MAXMIND/Test::ReportPrereqs' version: '0.021' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: '@MAXMIND/Test::More with subtest()' version: '5.043' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@MAXMIND/Modules for use with tidyall' version: '5.043' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 1 check_all_prereqs: 1 modules: [] phase: release skip: - Dist::Zilla::Plugin::MAXMIND::Contributors - Dist::Zilla::Plugin::MAXMIND::License - Dist::Zilla::Plugin::MAXMIND::Tidyall name: '@MAXMIND/stale modules, release' version: '0.047' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod name: '@MAXMIND/ReadmeMarkdownInBuild' version: '0.150250' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod name: '@MAXMIND/ReadmeMarkdownInRoot' version: '0.150250' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@MAXMIND/UploadToCPAN' version: '5.043' - class: Dist::Zilla::Plugin::PruneCruft name: '@MAXMIND/PruneCruft' version: '5.043' - class: Dist::Zilla::Plugin::ManifestSkip name: '@MAXMIND/ManifestSkip' version: '5.043' - class: Dist::Zilla::Plugin::MetaYAML name: '@MAXMIND/MetaYAML' version: '5.043' - class: Dist::Zilla::Plugin::License name: '@MAXMIND/License' version: '5.043' - class: Dist::Zilla::Plugin::ExtraTests name: '@MAXMIND/ExtraTests' version: '5.043' - class: Dist::Zilla::Plugin::ExecDir name: '@MAXMIND/ExecDir' version: '5.043' - class: Dist::Zilla::Plugin::ShareDir name: '@MAXMIND/ShareDir' version: '5.043' - class: Dist::Zilla::Plugin::Manifest name: '@MAXMIND/Manifest' version: '5.043' - class: Dist::Zilla::Plugin::CheckVersionIncrement name: '@MAXMIND/CheckVersionIncrement' version: '0.121750' - class: Dist::Zilla::Plugin::TestRelease name: '@MAXMIND/TestRelease' version: '5.043' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@MAXMIND/ConfirmRelease' version: '5.043' - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@MAXMIND/CheckPrereqsIndexed' version: '0.017' - class: Dist::Zilla::Plugin::CPANFile name: '@MAXMIND/CPANFile' version: '5.043' - class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch config: Dist::Zilla::Role::Git::Repo: repo_root: . name: '@MAXMIND/Git::CheckFor::CorrectBranch' version: '0.013' - class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts config: Dist::Zilla::Role::Git::Repo: repo_root: . name: '@MAXMIND/Git::CheckFor::MergeConflicts' version: '0.013' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: include_authors: 0 include_releaser: 1 order_by: name paths: - . name: '@MAXMIND/Git::Contributors' version: '0.018' - class: Dist::Zilla::Plugin::InstallGuide name: '@MAXMIND/InstallGuide' version: '1.200006' - class: Dist::Zilla::Plugin::MAXMIND::Contributors name: '@MAXMIND/MAXMIND::Contributors' version: '0.12' - class: Dist::Zilla::Plugin::MAXMIND::License name: '@MAXMIND/MAXMIND::License' version: '0.12' - class: Dist::Zilla::Plugin::MAXMIND::TidyAll name: '@MAXMIND/MAXMIND::TidyAll' version: '0.12' - class: Dist::Zilla::Plugin::Meta::Contributors name: '@MAXMIND/Meta::Contributors' version: '0.002' - class: Dist::Zilla::Plugin::MetaConfig name: '@MAXMIND/MetaConfig' version: '5.043' - class: Dist::Zilla::Plugin::MetaJSON name: '@MAXMIND/MetaJSON' version: '5.043' - class: Dist::Zilla::Plugin::MinimumPerl name: '@MAXMIND/MinimumPerl' version: '1.006' - class: Dist::Zilla::Plugin::RewriteVersion config: Dist::Zilla::Plugin::RewriteVersion: add_tarball_name: 0 finders: - ':ExecFiles' - ':InstallModules' global: 0 skip_version_provider: 0 name: '@MAXMIND/RewriteVersion' version: '0.013' - class: Dist::Zilla::Plugin::SurgicalPodWeaver config: Dist::Zilla::Plugin::PodWeaver: finder: - ':InstallModules' - ':ExecFiles' plugins: - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: '4.012' - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: '4.012' - class: Pod::Weaver::Section::Name name: Name version: '4.012' - class: Pod::Weaver::Section::Version name: Version version: '4.012' - class: Pod::Weaver::Section::Region name: prelude version: '4.012' - class: Pod::Weaver::Section::Generic name: SYNOPSIS version: '4.012' - class: Pod::Weaver::Section::Generic name: DESCRIPTION version: '4.012' - class: Pod::Weaver::Section::Leftovers name: Leftovers version: '4.012' - class: Pod::Weaver::Section::Region name: postlude version: '4.012' - class: Pod::Weaver::Section::Authors name: Authors version: '4.012' - class: Pod::Weaver::Section::Contributors name: Contributors version: '0.009' - class: Pod::Weaver::Section::Legal name: Legal version: '4.012' name: '@MAXMIND/SurgicalPodWeaver' version: '0.0023' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@MAXMIND/PodSyntaxTests' version: '5.043' - class: Dist::Zilla::Plugin::Test::CPAN::Changes name: '@MAXMIND/Test::CPAN::Changes' version: '0.009' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':InstallModules' - ':ExecFiles' - ':TestFiles' trailing_whitespace: '1' name: '@MAXMIND/Test::EOL' version: '0.18' - class: Dist::Zilla::Plugin::Test::NoTabs config: Dist::Zilla::Plugin::Test::NoTabs: filename: xt/author/no-tabs.t finder: - ':InstallModules' - ':ExecFiles' - ':TestFiles' name: '@MAXMIND/Test::NoTabs' version: '0.15' - class: Dist::Zilla::Plugin::Test::Portability name: '@MAXMIND/Test::Portability' version: '2.000006' - class: Dist::Zilla::Plugin::Test::Synopsis name: '@MAXMIND/Test::Synopsis' version: '2.000006' - class: Dist::Zilla::Plugin::Test::TidyAll name: '@MAXMIND/Test::TidyAll' version: '0.01' - class: Dist::Zilla::Plugin::Test::Version name: '@MAXMIND/Test::Version' version: '1.05' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: '0' fail_on_warning: author fake_home: 0 filename: xt/author/00-compile.t module_finder: - ':InstallModules' needs_display: 0 phase: develop script_finder: - ':PerlExecFiles' skips: [] name: '@MAXMIND/Test::Compile' version: '2.054' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - .mailmap - CONTRIBUTING.md - Changes - LICENSE - Makefile.PL - README.md - cpanfile allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . name: '@MAXMIND/Git::Check' version: '2.036' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: v%v%n%n%c Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - .mailmap - CONTRIBUTING.md - Changes - LICENSE - Makefile.PL - README.md - cpanfile allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@MAXMIND/commit generated files' version: '2.036' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: v0.040001 tag_format: v%v tag_message: v%v Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@MAXMIND/Git::Tag' version: '2.036' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: repo_root: . name: '@MAXMIND/Git::Push' version: '2.036' - class: Dist::Zilla::Plugin::BumpVersionAfterRelease config: Dist::Zilla::Plugin::BumpVersionAfterRelease: finders: - ':ExecFiles' - ':InstallModules' global: 0 munge_makefile_pl: 1 name: '@MAXMIND/BumpVersionAfterRelease' version: '0.013' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: 'Bump version after release' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - dist.ini allow_dirty_match: - (?^:.+) changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@MAXMIND/commit version bump' version: '2.036' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: repo_root: . name: '@MAXMIND/push version bump' version: '2.036' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '5.043' - class: Dist::Zilla::Plugin::FinderCode name: '@MAXMIND/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '5.043' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '5.043' x_authority: cpan:MAXMIND x_contributors: - 'Greg Oschwald ' MaxMind-DB-Common-0.040001/tidyall.ini0000644000175000017500000000075412654160756015623 0ustar greggreg[PerlTidy] select = **/*.{pl,pm,t,psgi} ignore = t/00-* ignore = t/author-* ignore = t/release-* ignore = blib/**/* ignore = .build/**/* ignore = MaxMind-DB-Common-*/**/* argv = --profile=$ROOT/perltidyrc [PerlCritic] select = **/*.{pl,pm,t,psgi} ignore = t/00-* ignore = t/author-* ignore = t/release-* ignore = blib/**/* ignore = .build/**/* ignore = MaxMind-DB-Common-*/**/* argv = --profile $ROOT/perlcriticrc --program-extensions .pl --program-extensions .t --program-extensions .psgi MaxMind-DB-Common-0.040001/MANIFEST0000644000175000017500000000127512654160756014610 0ustar greggreg# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.043. Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README.md cpanfile dist.ini lib/MaxMind/DB/Common.pm lib/MaxMind/DB/Metadata.pm lib/MaxMind/DB/Role/Debugs.pm lib/MaxMind/DB/Types.pm lib/Test/MaxMind/DB/Common/Data.pm lib/Test/MaxMind/DB/Common/Util.pm perlcriticrc perltidyrc t/00-report-prereqs.dd t/00-report-prereqs.t t/MaxMind/DB/Common.t t/MaxMind/DB/Metadata.t t/author-00-compile.t t/author-eol.t t/author-no-tabs.t t/author-pod-spell.t t/author-pod-syntax.t t/author-test-version.t t/compile.t t/release-cpan-changes.t t/release-portability.t t/release-synopsis.t t/release-tidyall.t tidyall.ini MaxMind-DB-Common-0.040001/t/0000775000175000017500000000000012654160756013717 5ustar greggregMaxMind-DB-Common-0.040001/t/MaxMind/0000775000175000017500000000000012654160756015254 5ustar greggregMaxMind-DB-Common-0.040001/t/MaxMind/DB/0000775000175000017500000000000012654160756015541 5ustar greggregMaxMind-DB-Common-0.040001/t/MaxMind/DB/Common.t0000644000175000017500000000051112654160756017151 0ustar greggreguse strict; use warnings; use Test::More; use MaxMind::DB::Common qw( LEFT_RECORD RIGHT_RECORD DATA_SECTION_SEPARATOR_SIZE ); is( LEFT_RECORD, 0, 'LEFT_RECORD' ); is( RIGHT_RECORD, 1, 'RIGHT_RECORD' ); is( DATA_SECTION_SEPARATOR_SIZE, 16, 'DATA_SECTION_SEPARATOR_SIZE' ); done_testing(); MaxMind-DB-Common-0.040001/t/MaxMind/DB/Metadata.t0000644000175000017500000000136012654160756017444 0ustar greggreguse strict; use warnings; use Test::More; use Math::BigInt (); use MaxMind::DB::Metadata; my %args = ( binary_format_major_version => 1, binary_format_minor_version => 1, build_epoch => time(), database_type => 'Test', description => { foo => 'bar' }, ip_version => 4, node_count => 100, record_size => 32, ); { my $metadata = MaxMind::DB::Metadata->new(%args); ok( $metadata, 'code compiles' ); } { my $metadata = MaxMind::DB::Metadata->new( %args, binary_format_major_version => Math::BigInt->bone, ); ok( $metadata, 'Math::BigInt works as Int in Metadata' ); } done_testing(); MaxMind-DB-Common-0.040001/t/00-report-prereqs.dd0000644000175000017500000000572312654160756017444 0ustar greggregdo { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0', 'perl' => '5.008' } }, 'develop' => { 'requires' => { 'Code::TidyAll' => '0.24', 'File::Spec' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', 'Perl::Critic' => '1.123', 'Perl::Tidy' => '20140711', 'Test::CPAN::Changes' => '0.19', 'Test::Code::TidyAll' => '0.24', 'Test::EOL' => '0', 'Test::More' => '0.88', 'Test::NoTabs' => '0', 'Test::Pod' => '1.41', 'Test::Spelling' => '0.12', 'Test::Synopsis' => '0', 'Test::Version' => '1' } }, 'runtime' => { 'requires' => { 'Carp' => '0', 'Data::Dumper::Concise' => '0', 'DateTime' => '0', 'Exporter' => '0', 'List::AllUtils' => '0', 'Math::BigInt' => '0', 'Moo' => '0', 'Moo::Role' => '0', 'MooX::StrictConstructor' => '0', 'Scalar::Util' => '0', 'Sub::Quote' => '0', 'autodie' => '0', 'constant' => '0', 'namespace::autoclean' => '0', 'overload' => '0', 'perl' => '5.008', 'strict' => '0', 'warnings' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'Test::More' => '0.96', 'perl' => '5.008' } } }; $x; }MaxMind-DB-Common-0.040001/t/author-eol.t0000644000175000017500000000177112654160756016167 0ustar greggreg 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; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.18 use Test::More 0.88; use Test::EOL; my @files = ( 'lib/MaxMind/DB/Common.pm', 'lib/MaxMind/DB/Metadata.pm', 'lib/MaxMind/DB/Role/Debugs.pm', 'lib/MaxMind/DB/Types.pm', 'lib/Test/MaxMind/DB/Common/Data.pm', 'lib/Test/MaxMind/DB/Common/Util.pm', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/MaxMind/DB/Common.t', 't/MaxMind/DB/Metadata.t', 't/author-00-compile.t', 't/author-eol.t', 't/author-no-tabs.t', 't/author-pod-spell.t', 't/author-pod-syntax.t', 't/author-test-version.t', 't/compile.t', 't/release-cpan-changes.t', 't/release-portability.t', 't/release-synopsis.t', 't/release-tidyall.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; MaxMind-DB-Common-0.040001/t/author-no-tabs.t0000644000175000017500000000173712654160756016755 0ustar greggreg 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; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15 use Test::More 0.88; use Test::NoTabs; my @files = ( 'lib/MaxMind/DB/Common.pm', 'lib/MaxMind/DB/Metadata.pm', 'lib/MaxMind/DB/Role/Debugs.pm', 'lib/MaxMind/DB/Types.pm', 'lib/Test/MaxMind/DB/Common/Data.pm', 'lib/Test/MaxMind/DB/Common/Util.pm', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/MaxMind/DB/Common.t', 't/MaxMind/DB/Metadata.t', 't/author-00-compile.t', 't/author-eol.t', 't/author-no-tabs.t', 't/author-pod-spell.t', 't/author-pod-syntax.t', 't/author-test-version.t', 't/compile.t', 't/release-cpan-changes.t', 't/release-portability.t', 't/release-synopsis.t', 't/release-tidyall.t' ); notabs_ok($_) foreach @files; done_testing; MaxMind-DB-Common-0.040001/t/release-synopsis.t0000644000175000017500000000031612654160756017407 0ustar greggreg#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::Synopsis; all_synopsis_ok(); MaxMind-DB-Common-0.040001/t/author-pod-spell.t0000644000175000017500000000117012654160756017300 0ustar greggreg 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.007000 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ Alders Alders' Eilam Eilam's MaxMind MaxMind's Oschwald Oschwald's Rolsky Rolsky's API GitHub IP VERSIONING YYY YYYZZZ metadata timestamp versioning Dave drolsky Olaf oalders Inc Greg goschwald lib DB Common Metadata Role Debugs Types Test Data Util MaxMind-DB-Common-0.040001/t/author-test-version.t0000644000175000017500000000107112654160756020043 0ustar greggreg 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::Version 1.05 use Test::Version; my @imports = qw( version_all_ok ); my $params = { is_strict => 0, has_version => 1, multiple => 0, }; push @imports, $params if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); Test::Version->import(@imports); version_all_ok; done_testing; MaxMind-DB-Common-0.040001/t/00-report-prereqs.t0000644000175000017500000001273112654160756017315 0ustar greggreg#!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.021 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do 't/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; if ( $source && $HAS_CPAN_META ) { if ( my $meta = eval { CPAN::Meta->load_file($source) } ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } } else { $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if $mod eq 'perl'; next if grep { $_ eq $mod } @exclude; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( @dep_errors ) { diag join("\n", "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n", "The following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass; # vim: ts=4 sts=4 sw=4 et: MaxMind-DB-Common-0.040001/t/release-portability.t0000644000175000017500000000053512654160756020065 0ustar greggreg#!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; eval 'use Test::Portability::Files'; plan skip_all => 'Test::Portability::Files required for testing portability' if $@; run_tests(); MaxMind-DB-Common-0.040001/t/release-tidyall.t0000644000175000017500000000050712654160756017164 0ustar greggreg#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } # This file was automatically generated by Dist::Zilla::Plugin::Test::TidyAll use Test::Code::TidyAll 0.24; use Test::More 0.88; tidyall_ok(); done_testing(); MaxMind-DB-Common-0.040001/t/author-pod-syntax.t0000644000175000017500000000050312654160756017506 0ustar greggreg#!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for testing by the author'); } } # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); MaxMind-DB-Common-0.040001/t/compile.t0000644000175000017500000000021012654160756015523 0ustar greggreguse strict; use warnings; use Test::More 0.88; use_ok('MaxMind::DB::Metadata'); use_ok('MaxMind::DB::Role::Debugs'); done_testing(); MaxMind-DB-Common-0.040001/t/author-00-compile.t0000644000175000017500000000274412654160756017256 0ustar greggreg BEGIN { unless ($ENV{AUTHOR_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for testing by the author'); } } use 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.054 use Test::More; plan tests => 7; my @module_files = ( 'MaxMind/DB/Common.pm', 'MaxMind/DB/Metadata.pm', 'MaxMind/DB/Role/Debugs.pm', 'MaxMind/DB/Types.pm', 'Test/MaxMind/DB/Common/Data.pm', 'Test/MaxMind/DB/Common/Util.pm' ); # no fake home requested my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ); MaxMind-DB-Common-0.040001/t/release-cpan-changes.t0000644000175000017500000000052112654160756020045 0ustar greggreg#!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();