diff -Nru libpgobject-type-bytestring-perl-1.2.0/Changes libpgobject-type-bytestring-perl-1.2.3/Changes --- libpgobject-type-bytestring-perl-1.2.0/Changes 2017-05-10 21:30:05.000000000 +0000 +++ libpgobject-type-bytestring-perl-1.2.3/Changes 2018-06-16 21:22:37.000000000 +0000 @@ -1,7 +1,17 @@ Revision history for PGObject-Type-ByteString -1.2.0 2017-05-16 - Adds support for PGObject 2.x +1.2.3 2018-06-16 + Correct inversed condition after fixes + +1.2.2 2018-06-16 + Restore support for undefined values + +1.2.1 2018-06-16 + Address warning thrown by LedgerSMB tests + +1.2.0 2017-05-16 + Adds support for PGObject 2.x + 1.1.2 2016-12-04 Fix copyright attribution in LICENSE (consistency) diff -Nru libpgobject-type-bytestring-perl-1.2.0/debian/changelog libpgobject-type-bytestring-perl-1.2.3/debian/changelog --- libpgobject-type-bytestring-perl-1.2.0/debian/changelog 2017-07-04 20:23:19.000000000 +0000 +++ libpgobject-type-bytestring-perl-1.2.3/debian/changelog 2018-06-17 03:14:44.000000000 +0000 @@ -1,3 +1,15 @@ +libpgobject-type-bytestring-perl (1.2.3-1) unstable; urgency=medium + + [ Salvatore Bonaccorso ] + * Update Vcs-* headers for switch to salsa.debian.org + + [ Robert James Clay ] + * Import upstream version 1.2.3 + * Update debian/copyright for new upstream version. + * declare conformance with Policy 4.1.4. (no changes needed) + + -- Robert James Clay Sat, 16 Jun 2018 23:14:44 -0400 + libpgobject-type-bytestring-perl (1.2.0-1) unstable; urgency=medium * Team upload. diff -Nru libpgobject-type-bytestring-perl-1.2.0/debian/control libpgobject-type-bytestring-perl-1.2.3/debian/control --- libpgobject-type-bytestring-perl-1.2.0/debian/control 2017-07-04 20:23:19.000000000 +0000 +++ libpgobject-type-bytestring-perl-1.2.3/debian/control 2018-06-17 03:14:44.000000000 +0000 @@ -8,10 +8,11 @@ Build-Depends-Indep: libdbd-pg-perl, libfile-slurp-perl, libpgobject-perl (>= 1.403.2), + libref-util-perl, perl -Standards-Version: 4.0.0 -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libpgobject-type-bytestring-perl.git -Vcs-Git: https://anonscm.debian.org/git/pkg-perl/packages/libpgobject-type-bytestring-perl.git +Standards-Version: 4.1.4 +Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libpgobject-type-bytestring-perl +Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libpgobject-type-bytestring-perl.git Homepage: https://metacpan.org/release/PGObject-Type-ByteString Package: libpgobject-type-bytestring-perl @@ -19,7 +20,8 @@ Depends: ${misc:Depends}, ${perl:Depends}, libdbd-pg-perl, - libpgobject-perl (>= 1.403.2) + libpgobject-perl (>= 1.403.2), + libref-util-perl Description: wrapper for raw strings mapping to BYTEA columns PGObject::Type::ByteString provides a basic wrapper around Perl strings, mapping them to a BYTEA field. diff -Nru libpgobject-type-bytestring-perl-1.2.0/debian/copyright libpgobject-type-bytestring-perl-1.2.3/debian/copyright --- libpgobject-type-bytestring-perl-1.2.0/debian/copyright 2017-07-04 20:23:19.000000000 +0000 +++ libpgobject-type-bytestring-perl-1.2.3/debian/copyright 2018-06-17 03:14:44.000000000 +0000 @@ -4,11 +4,13 @@ Upstream-Name: PGObject-Type-ByteString Files: * -Copyright: 2016, Erik Huelsmann +Copyright: 2016-2018, Erik Huelsmann License: BSD-2-clause Files: debian/* -Copyright: 2016, Robert James Clay +Copyright: 2016-2018, Robert James Clay , + 2018, Salvatore Bonaccorso , + 2017, gregor herrmann License: BSD-2-clause or Artistic or GPL-1+ License: BSD-2-clause diff -Nru libpgobject-type-bytestring-perl-1.2.0/lib/PGObject/Type/ByteString.pm libpgobject-type-bytestring-perl-1.2.3/lib/PGObject/Type/ByteString.pm --- libpgobject-type-bytestring-perl-1.2.0/lib/PGObject/Type/ByteString.pm 2017-05-10 21:29:36.000000000 +0000 +++ libpgobject-type-bytestring-perl-1.2.3/lib/PGObject/Type/ByteString.pm 2018-06-16 21:22:48.000000000 +0000 @@ -3,21 +3,22 @@ use strict; use warnings; -use 5.008; +use 5.010; use Carp; use DBD::Pg qw(:pg_types); +use Ref::Util qw(is_ref is_scalarref); =head1 NAME -PGObject::Type::ByteString - Wrapper for raw strings mapping to BYTEA columns +PGObject::Type::ByteString - Wrapper for raw strings mapping to BYTEA columns. =head1 VERSION -Version 1.1.2 +Version 1.2.3 =cut -our $VERSION = '1.2.0'; +our $VERSION = '1.2.3'; =head1 SYNOPSIS @@ -28,12 +29,16 @@ =head1 DESCRIPTION This module provides a basic wrapper around Perl strings, mapping them to +BYTEA database columns. + +PGObject::Type::ByteString objects have no traditional properties, however +dereferencing them will yield the raw string they contain. =head1 SUBROUTINES/METHODS -=head2 register +=head2 register([registry => 'default',] [types => $types_arrayref]) -By default registers PG_BYTEA +By default registers type PG_BYTEA. =cut @@ -64,15 +69,19 @@ =head2 new +Instantiates and returns a new object, based on the supplied scalar string, +or scalar string reference. + +Dereferencing the returned object will yield the original raw string. =cut sub new { my ($class, $value) = @_; my $self; - croak 'Must pass scalar or scalar ref' - if defined ref $value and ref $value !~ /SCALAR/; - if (ref $value ) { + croak 'Must pass scalar or scalar ref' + if is_ref($value) && ! is_scalarref($value); + if (is_ref($value)) { $self = $value; } else { $self = \$value; @@ -83,7 +92,8 @@ =head2 from_db -Parses a date from YYYY-MM-DD format and generates the new object based on it. +Returns a new PGObject::Type::ByteString object based on the supplied +scalar string, or scalar string reference. =cut @@ -94,7 +104,8 @@ =head2 to_db -Returns the date in YYYY-MM-DD format. +Returns the object's binary string value packaged as PG_BYTEA type/value +hashref suitable for passing to DBD::Pg. =cut @@ -116,8 +127,6 @@ automatically be notified of progress on your bug as I make changes. - - =head1 SUPPORT You can find documentation for this module with the perldoc command. @@ -153,7 +162,7 @@ =head1 LICENSE AND COPYRIGHT -Copyright 2016 Erik Huelsmann +Copyright 2016-2018 Erik Huelsmann This program is released under the following license: BSD diff -Nru libpgobject-type-bytestring-perl-1.2.0/Makefile.PL libpgobject-type-bytestring-perl-1.2.3/Makefile.PL --- libpgobject-type-bytestring-perl-1.2.0/Makefile.PL 2017-05-10 21:28:48.000000000 +0000 +++ libpgobject-type-bytestring-perl-1.2.3/Makefile.PL 2018-06-16 20:39:41.000000000 +0000 @@ -1,4 +1,4 @@ -use 5.006; +use 5.010; use strict; use warnings; use ExtUtils::MakeMaker; @@ -13,8 +13,9 @@ : ()), PL_FILES => {}, PREREQ_PM => { - 'PGObject' => '1.403.2', - 'DBD::Pg' => '1.20', + 'PGObject' => '1.403.2', + 'DBD::Pg' => '1.20', + 'Ref::Util' => 0, }, BUILD_REQUIRES => { 'Test::More' => 0, diff -Nru libpgobject-type-bytestring-perl-1.2.0/META.json libpgobject-type-bytestring-perl-1.2.3/META.json --- libpgobject-type-bytestring-perl-1.2.0/META.json 2017-05-21 15:15:25.000000000 +0000 +++ libpgobject-type-bytestring-perl-1.2.3/META.json 2018-06-16 21:25:06.000000000 +0000 @@ -1,10 +1,10 @@ { - "abstract" : "Wrapper for raw strings mapping to BYTEA columns", + "abstract" : "Wrapper for raw strings mapping to BYTEA columns.", "author" : [ "Erik Huelsmann " ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150005", + "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001", "license" : [ "bsd" ], @@ -34,7 +34,8 @@ "runtime" : { "requires" : { "DBD::Pg" : "1.20", - "PGObject" : "v1.403.2" + "PGObject" : "v1.403.2", + "Ref::Util" : "0" } } }, @@ -46,6 +47,5 @@ "web" : "https://github.com/ledgersmb/PGObject-Type-ByteString" } }, - "version" : "v1.2.0", - "x_serialization_backend" : "JSON::PP version 2.27400" + "version" : "v1.2.3" } diff -Nru libpgobject-type-bytestring-perl-1.2.0/META.yml libpgobject-type-bytestring-perl-1.2.3/META.yml --- libpgobject-type-bytestring-perl-1.2.0/META.yml 2017-05-21 15:15:25.000000000 +0000 +++ libpgobject-type-bytestring-perl-1.2.3/META.yml 2018-06-16 21:25:06.000000000 +0000 @@ -1,5 +1,5 @@ --- -abstract: 'Wrapper for raw strings mapping to BYTEA columns' +abstract: 'Wrapper for raw strings mapping to BYTEA columns.' author: - 'Erik Huelsmann ' build_requires: @@ -8,7 +8,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150005' +generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001' license: bsd meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -21,7 +21,7 @@ requires: DBD::Pg: '1.20' PGObject: v1.403.2 + Ref::Util: '0' resources: repository: https://github.com/ledgersmb/PGObject-Type-ByteString.git -version: v1.2.0 -x_serialization_backend: 'CPAN::Meta::YAML version 0.018' +version: v1.2.3