PGObject-Simple-Role-2.000002/0000755000175000017500000000000013110076264014522 5ustar chrischrisPGObject-Simple-Role-2.000002/META.yml0000664000175000017500000000117513110076264016001 0ustar chrischris--- abstract: 'Moo/Moose mappers for minimalist PGObject framework' author: - 'Chris Travers, ' build_requires: ExtUtils::MakeMaker: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150005' license: bsd meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: PGObject-Simple-Role no_index: directory: - t - inc requires: Moo::Role: '0' PGObject::Simple: '3' Test::More: '0' version: 2.000002 x_serialization_backend: 'CPAN::Meta::YAML version 0.018' PGObject-Simple-Role-2.000002/Changes0000755000175000017500000000430713110074335016021 0ustar chrischrisRevision history for PGObject-Simple-Role 2.0.2 2017-05-20 Fixing backwards compatibility issue with _DBH in constructor 2.0.1 2017-05-20 Fixing an issue where package accessors do not provide package defaults 2.0 2017-05-19 Depending now on PGObject::Simple 3 No more code duplication We share state with PGObject functions New architecture. 1.13.2 2016-11-21 Fix minimum required dependency 1.13.1 2016-11-21 Fix minimum required dependency 1.13.0 2016-11-20 Fix issue #8: Let PGObject handle $value->to_db() calls Fix issue #9: No special casing of BYTEA function arguments Fix author tests 1.12.1 2016-06-14 Properly handling null when explicitly set. Doc fixes Able to get registry through this package. 1.12.0 2016-02-12 Fixing warning about unitialized value in subroutine entry 1.11.0 2014-08-25 Now safe regarding memoized PGObject catalog lookups 1.10.01 2014-05-01 Fixed wrong licensing reference in Makefile 1.01 2014-02-25 Handling of per-class default schemas 1.00 2014-02-18 Correct handling of lazy attributes Removed dbmethod() and documented why Contextual return of results so scalars return first row. 0.71 2014-02-15 Fixed Makefile.PL to ensure proper dependencies 0.70 2014-02-15 dbmethod() refactored so it is usable by libraries other than this one, is better tested, and more general. Use of the export here is now deprecated. 0.52 2014-01-14 Fixed funcprefix handling with call_procedure 0.51 2013-11-20 Fixed inability to push funcprefix through to PGObject::Simple 0.50 2013-11-13 Refactored to centralize logic in PGObject::Simple Added dbmethod() for declaratively defining database methods. 0.13 2013-11-06 Fixed test cases requiring Carp::Always, which was not in makefile. 0.12 2013-11-05 call_procedure can now be called on subclasses by package name if desired. 0.11 2013-05-31 Fixed an issue with the Makefile not reporting Moo::Role as a dependency 0.10 2013-05-30 First version, released on an unsuspecting world. PGObject-Simple-Role-2.000002/TODO0000755000175000017500000000005713105475754015232 0ustar chrischrisTODO for 1.0: Done, just need more test cases PGObject-Simple-Role-2.000002/META.json0000664000175000017500000000202213110076264016141 0ustar chrischris{ "abstract" : "Moo/Moose mappers for minimalist PGObject framework", "author" : [ "Chris Travers, " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150005", "license" : [ "bsd" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "PGObject-Simple-Role", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "Moo::Role" : "0", "PGObject::Simple" : "3", "Test::More" : "0" } } }, "release_status" : "stable", "version" : 2.000002, "x_serialization_backend" : "JSON::PP version 2.27400" } PGObject-Simple-Role-2.000002/Makefile.PL0000755000175000017500000000130213105567717016507 0ustar chrischris#!/usr/bin/perl use 5.010; use strict; use warnings; use ExtUtils::MakeMaker; WriteMakefile( NAME => 'PGObject::Simple::Role', AUTHOR => q{Chris Travers, }, VERSION_FROM => 'lib/PGObject/Simple/Role.pm', ABSTRACT_FROM => 'lib/PGObject/Simple/Role.pm', ($ExtUtils::MakeMaker::VERSION >= 6.3002 ? ('LICENSE'=> 'bsd') : ()), PL_FILES => {}, PREREQ_PM => { 'Test::More' => 0, 'Moo::Role' => 0, 'PGObject::Simple' => 3, }, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => 'PGObject-Simple-Role-*' }, ); PGObject-Simple-Role-2.000002/t/0000755000175000017500000000000013110076264014765 5ustar chrischrisPGObject-Simple-Role-2.000002/t/pod-coverage.t0000644000175000017500000000104713105475754017542 0ustar chrischrisuse strict; use warnings; use Test::More; # Ensure a recent version of Test::Pod::Coverage my $min_tpc = 1.08; eval "use Test::Pod::Coverage $min_tpc"; plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage" if $@; # Test::Pod::Coverage doesn't require a minimum Pod::Coverage version, # but older versions don't recognize some common documentation styles my $min_pc = 0.18; eval "use Pod::Coverage $min_pc"; plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage" if $@; all_pod_coverage_ok(); PGObject-Simple-Role-2.000002/t/manifest.t0000644000175000017500000000042013105475754016767 0ustar chrischris#!perl -T use strict; use warnings; use Test::More; unless ( $ENV{RELEASE_TESTING} ) { plan( skip_all => "Author tests not required for installation" ); } eval "use Test::CheckManifest 0.9"; plan skip_all => "Test::CheckManifest 0.9 required" if $@; ok_manifest(); PGObject-Simple-Role-2.000002/t/boilerplate.t0000644000175000017500000000236713105475754017477 0ustar chrischris#!perl -T use 5.006; use strict; use warnings; use Test::More tests => 3; sub not_in_file_ok { my ($filename, %regex) = @_; open( my $fh, '<', $filename ) or die "couldn't open $filename for reading: $!"; my %violated; while (my $line = <$fh>) { while (my ($desc, $regex) = each %regex) { if ($line =~ $regex) { push @{$violated{$desc}||=[]}, $.; } } } if (%violated) { fail("$filename contains boilerplate text"); diag "$_ appears on lines @{$violated{$_}}" for keys %violated; } else { pass("$filename contains no boilerplate text"); } } sub module_boilerplate_ok { my ($module) = @_; not_in_file_ok($module => 'the great new $MODULENAME' => qr/ - The great new /, 'boilerplate description' => qr/Quick summary of what the module/, 'stub function definition' => qr/function[12]/, ); } not_in_file_ok(README => "The README is used..." => qr/The README is used/, "'version information here'" => qr/to provide version information/, ); not_in_file_ok(Changes => "placeholder date/time" => qr(Date/time) ); module_boilerplate_ok('lib/PGObject/Simple/Role.pm'); PGObject-Simple-Role-2.000002/t/02-dbtests.t0000644000175000017500000001274113110075103017035 0ustar chrischrispackage test; use Moo; with 'PGObject::Simple::Role'; has id => (is => 'ro'); has foo => (is => 'ro'); has bar => (is => 'ro'); has baz => (is => 'ro'); has id2 => (is => 'lazy'); sub _build_id2 { return 10; } sub _get_dbh { return $main::dbh; } package test2; use Moo; with 'PGObject::Simple::Role'; has id => (is => 'ro'); has foo => (is => 'ro'); has bar => (is => 'ro'); has baz => (is => 'ro'); sub _get_dbh { return $main::dbh; } sub _get_prefix { return 'foo'; }; package test3; use Moo; with 'PGObject::Simple::Role'; sub _get_dbh { return 1; } package main; use Test::More; use Test::Exception; use DBI; use PGObject::Simple; plan skip_all => 'DB_TESTING not set' unless $ENV{DB_TESTING}; # Initial setup my $dbh1 = DBI->connect('dbi:Pg:', 'postgres'); plan skip_all => 'Needs superuser connection for this test script' unless $dbh1; $dbh1->do('CREATE DATABASE pgobject_test_db'); our $dbh = DBI->connect('dbi:Pg:dbname=pgobject_test_db', 'postgres'); plan skip_all => 'No db connection' unless $dbh; plan tests => 27; $dbh->do(' CREATE FUNCTION public.foobar (in_foo text, in_bar text, in_baz int, in_id int) RETURNS int language sql as $$ SELECT char_length($1) + char_length($2) + $3 * $4; $$; ') ; $dbh->do('CREATE SCHEMA TEST'); $dbh->do(' CREATE FUNCTION test.foobar (in_foo text, in_bar text, in_baz int, in_id int) RETURNS int language sql as $$ SELECT 2*(char_length($1) + char_length($2) + $3 * $4); $$; ') ; $dbh->do(' CREATE FUNCTION public.lazy_foobar (in_foo text, in_bar text, in_baz int, in_id2 int) RETURNS int language sql as $$ SELECT char_length($1) + char_length($2) + $3 * $4; $$; ') ; my $result; lives_ok { $result = test->call_dbmethod( funcname => 'foobar', args => {id => 3, foo => 'test1', bar => 'test2', baz => 33}, )} 'Able to call without instantiating'; is($result->{foobar}, 109, 'Correct Result, direct package call to call_dbmethod'); my $obj = test->new(id => 3, foo => 'test1', bar => 'test2', baz => 33); is($obj->_dbh, $dbh, 'Got correct dbh for obj via semiprivate attribute'); is($obj->dbh, $dbh, 'Got correct dbh for obj via public reader'); ($result) = $obj->call_dbmethod(funcname => 'foobar'); is($result->{foobar}, 109, 'Correct Result, no argument overrides'); $result = $obj->call_dbmethod(funcname => 'lazy_foobar'); is($result->{lazy_foobar}, 340, 'Correct handling of lazy attributes'); ($result) = $obj->call_procedure(funcname => 'foobar', args => ['test1', 'testing', '3', '33']); is($result->{foobar}, 111, 'Correct result, call_procedure'); ($result) = $obj->call_procedure(funcname => 'foobar', funcschema => 'test', args => ['test1', 'testing', '3', '33']); is($result->{foobar}, 222, 'Correct result, call_procedure'); ($result) = test->call_procedure(funcname => 'foobar', args => ['test1', 'testing', '3', '33']); is($result->{foobar}, 111, 'Correct result, direct package call to call_procedure'); $result = $obj->call_dbmethod(funcname => 'foobar'); is(ref $result, ref {}, 'Correct result type, scalar return, no arg overrides'); is($result->{foobar}, 109, 'Correct Result, no argument overrides, scalar return'); $result = test->call_procedure(funcname => 'foobar', args => ['test1', 'testing', '3', '33']); is($result->{foobar}, 111, 'Correct result, direct package call to call_procedure, scalar return'); ($result) = $obj->call_dbmethod(funcname => 'foobar', args=> {baz => 1}); is($result->{foobar}, 13, 'Correct result, argument overrides'); throws_ok{$obj->call_dbmethod(funcname => 'foobar', dbh => $dbh1)} qr/No such function/, 'No such function thrown using wrong db'; $obj = test2->new(id => 3, foo => 'test1', bar => 'test2', baz => 33); is($obj->funcprefix, 'foo', 'public printer returns correct value'); ($result) = $obj->call_dbmethod(funcname => 'bar'); is($result->{foobar}, 109, 'Correct Result, no argument overrides'); ($result) = $obj->call_procedure(funcname => 'bar', args => ['test1', 'testing', '3', '33']); is($result->{foobar}, 111, 'Correct result, call_procedure'); ($result) = $obj->call_dbmethod(funcname => 'bar', args=> {baz => 1}); is($result->{foobar}, 13, 'Correct result, argument overrides'); $obj->{_funcschema} = 'test'; ($result) = $obj->call_procedure(funcname => 'bar', args => ['test1', 'testing', '3', '33']); is($result->{foobar}, 222, 'Correct result, call_procedure, set schema'); ($result) = $obj->call_dbmethod(funcname => 'bar', args=> {baz => 1}); is($result->{foobar}, 26, 'Correct result, argument overrides'); throws_ok{$obj->call_dbmethod(funcname => 'bar', dbh => $dbh1)} qr/No such function/, 'No such function thrown using wrong db'; dies_ok { test3->new()->_dbh } 'test3 has a bad _get_dbh function, dies by default'; dies_ok { test3->new()->dbh } 'test3 has a bad _get_dbh function, dies by default getting dbh'; lives_ok { $obj = test3->new(_DBH => $dbh) } 'test3 has a bad _get_dbh function, but can set dbh via _DBH'; is($obj->dbh, $dbh, 'Got correct dbh back from _DBH'); lives_ok { $obj = test3->new(_dbh => $dbh) } 'test3 has a bad _get_dbh function, but can set via _dbh'; is($obj->dbh, $dbh, 'Got correct dbh back from _dbh'); # Teardown connections $dbh->disconnect; $dbh1->do('DROP DATABASE pgobject_test_db'); $dbh1->disconnect; PGObject-Simple-Role-2.000002/t/01-basic-constructor.t0000644000175000017500000000261513105631640021037 0ustar chrischris######### package test1; use Moo; with('PGObject::Simple::Role'); has 'id' => (is => 'ro'); has 'foo' => (is => 'ro'); has 'bar' => (is => 'ro'); has 'baz' => (is => 'ro'); package test2; use Moo; with('PGObject::Simple::Role'); has 'id' => (is => 'ro'); sub _get_dbh { return 1; } sub _get_prefix { 'foo' }; ########## package main; use Test::More tests => 14; use Test::Exception; use DBI; my %args = ( id => 3, foo => 'test1', bar => 'test2', baz => 33, biz => 112, ); my $obj; lives_ok {$obj = test1->new(%args)} 'created new object without crashing'; ok(eval {$obj->isa('test1')}, 'ISA test passed'); is($obj->id, 3, 'attribute id passed'); is($obj->funcprefix, '', 'Got correct function prefix(empty)'); is($obj->_registry, undef, 'Undefined registry at first'); is($obj->foo, 'test1', 'attribute foo passed'); is($obj->bar, 'test2', 'attribute bar passed'); is($obj->baz, 33, 'attribute baz passed'); ok(!defined($obj->can('biz')), 'No dbh method exists'); throws_ok {$obj->_build__dbh(1)} qr/Subclasses MUST set/, 'Threw exception, "Subclasses MUST set"'; lives_ok {$obj = test2->new(%args)} 'created new object without crashing'; is($obj->funcprefix, 'foo', 'Got correct function prefix'); throws_ok {$obj->_dbh} qr/Expected a database handle/, 'Threw exception, "Expected a database handle"'; lives_ok {$obj->set_dbh(4) } 'set-dbh goes through isa check'; PGObject-Simple-Role-2.000002/t/pod.t0000644000175000017500000000035013105475754015745 0ustar chrischris#!perl -T use strict; use warnings; use Test::More; # Ensure a recent version of Test::Pod my $min_tp = 1.22; eval "use Test::Pod $min_tp"; plan skip_all => "Test::Pod $min_tp required for testing POD" if $@; all_pod_files_ok(); PGObject-Simple-Role-2.000002/t/00-load.t0000644000175000017500000000031213105475754016315 0ustar chrischris#!perl -T use Test::More tests => 1; BEGIN { use_ok( 'PGObject::Simple::Role' ) || print "Bail out!\n"; } diag( "Testing PGObject::Simple::Role $PGObject::Simple::Role::VERSION, Perl $], $^X" ); PGObject-Simple-Role-2.000002/lib/0000755000175000017500000000000013110076264015270 5ustar chrischrisPGObject-Simple-Role-2.000002/lib/PGObject/0000755000175000017500000000000013110076264016725 5ustar chrischrisPGObject-Simple-Role-2.000002/lib/PGObject/Simple/0000755000175000017500000000000013110076264020156 5ustar chrischrisPGObject-Simple-Role-2.000002/lib/PGObject/Simple/Role.pm0000644000175000017500000001625113110075671021423 0ustar chrischrispackage PGObject::Simple::Role; use 5.010; use strict; use warnings; use Moo::Role; use PGObject::Simple ':full', '!dbh'; use Carp; =head1 NAME PGObject::Simple::Role - Moo/Moose mappers for minimalist PGObject framework =head1 VERSION Version 2.0.2 =cut our $VERSION = 2.000002; =head1 SYNOPSIS Take the following (Moose) class: package MyAPP::Foo; use PGObject::Util::DBMethod; use Moose; with 'PGObject::Simple::Role'; has id => (is => 'ro', isa => 'Int', required => 0); has foo => (is => 'ro', isa => 'Str', required => 0); has bar => (is => 'ro', isa => 'Str', required => 0); has baz => (is => 'ro', isa => 'Int', required => 0); sub get_dbh { return DBI->connect('dbi:Pg:dbname=foobar'); } # PGObject::Util::DBMethod exports this dbmethod int => (funcname => 'foo_to_int'); And a stored procedure: CREATE OR REPLACE FUNCTION foo_to_int (in_id int, in_foo text, in_bar text, in_baz int) RETURNS INT LANGUAGE SQL AS $$ select char_length($2) + char_length($3) + $1 * $4; $$; Then the following Perl code would work to invoke it: my $foobar = MyApp->foo(id => 3, foo => 'foo', bar => 'baz', baz => 33); $foobar->call_dbmethod(funcname => 'foo_to_int'); The following will also work since you have the dbmethod call above: my $int = $foobar->int; The full interface of call_dbmethod and call_procedure from PGObject::Simple are supported, and call_dbmethod is effectively wrapped by dbmethod(), allowing a declarative mapping. =head1 DESCRIPTION =head1 ATTRIBUTES AND LAZY GETTERS =cut has _dbh => ( # use dbh() to get and set_dbh() to set is => 'lazy', isa => sub { croak "Expected a database handle. Got $_[0] instead" unless eval {$_[0]->isa('DBI::db')}; }, ); has _DBH => ( # backwards compatible for 1.x. is => 'lazy', isa => sub { warn 'deprecated _DBH used. rename to _dbh when you can'; croak "Expected a database handle. Got $_[0] instead" unless eval {$_[0]->isa('DBI::db')}; }, ); sub _build__dbh { my ($self) = @_; return $self->{_DBH} if $self->{_DBH}; return $self->_get_dbh; } sub _build__DBH { my ($self) = @_; return $self->{_dbh} if $self->{_dbh}; return $self->_dbh; } sub _get_dbh { croak 'Invoked _get_dbh from role improperly. Subclasses MUST set this method'; } has _registry => (is => 'lazy'); sub _build__registry { my ($self) = @_; return $self->_get_registry() if $self->can('_get_registry'); _get_registry(); } =head2 _get_registry This is a method the consuming classes can override in order to set the registry of the calls for type mapping purposes. =cut sub _get_registry{ return undef; } has _funcschema => (is => 'lazy'); =head2 _get_schema Returns the default schema associated with the object. =cut sub _build__funcschema { return $_[0]->_get_schema; } sub _get_schema { return undef; } has _funcprefix => (is => 'lazy'); =head2 _get_prefix Returns string, default is an empty string, used to set a prefix for mapping stored prcedures to an object class. =cut sub _build__funcprefix { my ($self) = @_; return $self->_get_prefix; } sub _get_prefix { return ''; } =head1 READ ONLY ACCESSORS (PUBLIC) =head2 dbh Wraps the PGObject::Simple method =cut sub dbh { my ($self) = @_; if (ref $self){ return $self->_dbh; } return "$self"->_get_dbh; } =head2 funcschema Returns the schema bound to the object =cut sub funcschema { my ($self) = @_; return $self->_funcschema if ref $self; return "$self"->_get_schema(); } =head2 funcprefix Prefix for functions =cut sub funcprefix { my ($self) = @_; return $self->_funcprefix if ref $self; return "$self"->_get_prefix(); } =head1 REMOVED METHODS These methods were once part of this package but have been removed due to the philosophy of not adding framework dependencies when an application dependency can work just as well. =head2 dbmethod Included in versions 0.50 - 0.71. Instead of using this directly, use: use PGObject::Util::DBMethod; instead. Ideally this should be done in your actual class since that will allow you to dispense with the extra parentheses. However, if you need a backwards-compatible and central solution, since PGObject::Simple::Role generally assumes sub-roles will be created for managing db connections etc. you can put the use statement there and it will have the same impact as it did here when it was removed with the benefit of better testing. =head1 AUTHOR Chris Travers,, C<< >> =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll Chris Travers,, C<< >> =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SUPPORT You can find documentation for this module with the perldoc command. perldoc PGObject::Simple::Role You can also look for information at: =over 4 =item * RT: CPAN's request tracker (report bugs here) L =item * AnnoCPAN: Annotated CPAN documentation L =item * CPAN Ratings L =item * Search CPAN L =back =head1 ACKNOWLEDGEMENTS =head1 LICENSE AND COPYRIGHT Copyright 2013-2017 Chris Travers,. Redistribution and use in source and compiled forms with or without modification, are permitted provided that the following conditions are met: =over =item Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer as the first lines of this file unmodified. =item Redistributions in compiled form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the source code, documentation, and/or other materials provided with the distribution. =back THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =cut 1; # End of PGObject::Simple::Role PGObject-Simple-Role-2.000002/README0000755000175000017500000000527013105475754015424 0ustar chrischrisPGObject-Simple-Role PGObject::Simple::Role is a Moo/Moose mapper for minimalist PGObject framework (embodied in PGObject::Simple). Basically it provides a way to easily map stored procedures using the conventions of PGObject::Simple for Moo/Moose environments. PGObject::Simple::Role is a Moo role which allows you to use this functionality in Moo and Moose environments. The role itself makes no assumptions about database state, but provides hooks for classes to use to retrieve or create database handles for their use. This module is suited to quick and easy integration of PostgreSQL stored procedures with Moo and Moose object models. It is quite powerful and it makes developing in such environments relatively easy. INSTALLATION To install this module, run the following commands: perl Makefile.PL make make test make install SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc PGObject::Simple::Role You can also look for information at: RT, CPAN's request tracker (report bugs here) http://rt.cpan.org/NoAuth/Bugs.html?Dist=PGObject-Simple-Role AnnoCPAN, Annotated CPAN documentation http://annocpan.org/dist/PGObject-Simple-Role CPAN Ratings http://cpanratings.perl.org/d/PGObject-Simple-Role Search CPAN http://search.cpan.org/dist/PGObject-Simple-Role/ LICENSE AND COPYRIGHT Copyright (C) 2013 Chris Travers Redistribution and use in source and compiled forms with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code (Perl) must retain the above copyright notice, this list of conditions and the following disclaimer as the first lines of this file unmodified. * Redistributions in compiled form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the source code, documentation, and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PGObject-Simple-Role-2.000002/README.md0000644000175000017500000000527513105570363016015 0ustar chrischrisPGObject-Simple-Role PGObject::Simple::Role is a Moo/Moose mapper for minimalist PGObject framework (embodied in PGObject::Simple). Basically it provides a way to easily map stored procedures using the conventions of PGObject::Simple for Moo/Moose environments. PGObject::Simple::Role is a Moo role which allows you to use this functionality in Moo and Moose environments. The role itself makes no assumptions about database state, but provides hooks for classes to use to retrieve or create database handles for their use. This module is suited to quick and easy integration of PostgreSQL stored procedures with Moo and Moose object models. It is quite powerful and it makes developing in such environments relatively easy. INSTALLATION To install this module, run the following commands: perl Makefile.PL make make test make install SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc PGObject::Simple::Role You can also look for information at: RT, CPAN's request tracker (report bugs here) http://rt.cpan.org/NoAuth/Bugs.html?Dist=PGObject-Simple-Role AnnoCPAN, Annotated CPAN documentation http://annocpan.org/dist/PGObject-Simple-Role CPAN Ratings http://cpanratings.perl.org/d/PGObject-Simple-Role Search CPAN http://search.cpan.org/dist/PGObject-Simple-Role/ LICENSE AND COPYRIGHT Copyright (C) 2013-2017 Chris Travers Redistribution and use in source and compiled forms with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code (Perl) must retain the above copyright notice, this list of conditions and the following disclaimer as the first lines of this file unmodified. * Redistributions in compiled form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the source code, documentation, and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PGObject-Simple-Role-2.000002/ignore.txt0000755000175000017500000000020213105475754016556 0ustar chrischrisblib* Makefile Makefile.old Build Build.bat _build* pm_to_blib* *.tar.gz .lwpcookies cover_db pod2htm*.tmp PGObject-Simple-Role-* PGObject-Simple-Role-2.000002/MANIFEST0000644000175000017500000000065413110076264015660 0ustar chrischrisChanges ignore.txt lib/PGObject/Simple/Role.pm LICENSE Makefile.PL MANIFEST This list of files MANIFEST.SKIP README README.md t/00-load.t t/01-basic-constructor.t t/02-dbtests.t t/boilerplate.t t/manifest.t t/pod-coverage.t t/pod.t TODO META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) PGObject-Simple-Role-2.000002/LICENSE0000644000175000017500000000241713105475754015546 0ustar chrischrisCopyright (c) 2013, Chris Travers All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.PGObject-Simple-Role-2.000002/MANIFEST.SKIP0000644000175000017500000000130513105570040016412 0ustar chrischris #!start included /usr/lib/perl5/5.10/ExtUtils/MANIFEST.SKIP # Avoid version control files. \B\.svn\b \B\.git\b \B\.gitignore\b \B\.hg\b \B\.travis\.yml\b # Avoid Makemaker generated and utility files. \bMANIFEST\.bak \bMakefile$ \bblib/ \bMakeMaker-\d \bpm_to_blib\.ts$ \bpm_to_blib$ \bblibdirs\.ts$ # 6.18 through 6.25 generated this # Avoid Module::Build generated and utility files. \bBuild$ \b_build/ # Avoid temp and backup files. ~$ \.old$ \#$ \b\.# \.bak$ # Avoid Devel::Cover files. \bcover_db\b #!end included /usr/lib/perl5/5.10/ExtUtils/MANIFEST.SKIP ^extlib ^Su-.+\.tar\.gz$ ^work ^tmp \bTAGS$ ^MYMETA.yml$ ^MYMETA.json$ \bSu-[\d\.\_]+ \bt_util/ Debian_CPANTS.txt \blib/Su/Procs/