PGObject-Simple-1.8/0000755000175000017500000000000012375771527013270 5ustar chrischrisPGObject-Simple-1.8/LICENSE0000644000175000017500000000241712302330246014254 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-1.8/README0000644000175000017500000000356212302330246014131 0ustar chrischrisPGObject-Simple PBObject::Simple is a minimalist framework for mapping stored procedures in PostgreSQL to object methods. The framework is truly minimalist and hence the "Simple" designation (in fact the module contains less than 50 lines of code, and the code is dwarfed by both POD and test cases). It is intended to be of use for developers wishing for such a minimalist framework and those who may want to have a reference for how to build such a mapping framework themselves. The framework lends itself to a few specific antipatterns. Objects can become ill-formed, overly nebulous, or the like. It is thus very important when using this for actual development to ensure that acceptable data structures are well documented and that these are adhered to. This module is based on a simple idea, namely that stored procedures can tell application classes how to call them. See the POD for specific information and guidelines. 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 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 AnnoCPAN, Annotated CPAN documentation http://annocpan.org/dist/PGObject-Simple CPAN Ratings http://cpanratings.perl.org/d/PGObject-Simple Search CPAN http://search.cpan.org/dist/PGObject-Simple/ LICENSE AND COPYRIGHT Copyright (C) 2013 Chris Travers This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information. PGObject-Simple-1.8/lib/0000755000175000017500000000000012375771527014036 5ustar chrischrisPGObject-Simple-1.8/lib/PGObject/0000755000175000017500000000000012375771527015473 5ustar chrischrisPGObject-Simple-1.8/lib/PGObject/Simple.pm0000644000175000017500000002752412375771466017276 0ustar chrischrispackage PGObject::Simple; use 5.006; use strict; use warnings; use Carp; use PGObject; =head1 NAME PGObject::Simple - Minimalist stored procedure mapper based on LedgerSMB's DBObject =head1 VERSION Version 1.8 =cut our $VERSION = '1.8'; =head1 SYNOPSIS use PGObject::Simple; my $obj = PGObject::Simple->new(%myhash); $obj->set_dbh($dbh); # Database connection To call a stored procedure with enumerated arguments. my @results = $obj->call_procedure( funcname => $funcname, funcschema => $funcname, args => [$arg1, $arg2, $arg3], ); You can add something like a running total as well: my @results = $obj->call_procedure( funcname => $funcname, funcschema => $funcname, args => [$arg1, $arg2, $arg3], running_funcs => [{agg => 'sum(amount)', alias => 'total'}], ); To call a stored procedure with named arguments from a hashref. This is typically done when mapping object properties in to stored procedure arguments. my @results = $obj->call_dbmethod( funcname => $funcname, funcschema => $funcname, running_funcs => [{agg => 'sum(amount)', alias => 'total'}], ); To call a stored procedure with named arguments from a hashref with overrides. my @results = $obj->call_dbmethod( funcname => 'customer_save', funcschema => 'public', running_funcs => [{agg => 'sum(amount)', alias => 'total'}], args => { id => undef }, # force to create new! ); =head1 DESCRIPTION PGObject::Simple a top-half object system for PGObject which is simple and inspired by (and a subset functionally speaking of) the simple stored procedure object method system of LedgerSMB 1.3. The framework discovers stored procedure APIs and dispatches to them and can therefore be a base for application-specific object models and much more. PGObject::Simple is designed to be light-weight and yet robust glue between your object model and the RDBMS's stored procedures. It works by looking up the stored procedure arguments, stripping them of the conventional prefix 'in_', and mapping what is left to object property names. Properties can be overridden by passing in a hashrefs in the args named argument. Named arguments there will be used in place of object properties. This system is quite flexible, perhaps too much so, and it relies on the database encapsulating its own logic behind self-documenting stored procedures using consistent conventions. No function which is expected to be discovered can be overloaded, and all arguments must be named for their object properties. For this reason the use of this module fundamentally changes the contract of the stored procedure from that of a fixed number of arguments in fixed types contract to one where the name must be unique and the stored procedures must be coded to the application's interface. This inverts the way we typically think about stored procedures and makes them much more application friendly. =head1 SUBROUTINES/METHODS =head2 new This constructs a new object. Basically it copies the incoming hash (one level deep) and then blesses it. If the hash passed in has a dbh member, the dbh is set to that. This does not set the function prefix, as this is assumed to be done implicitly by subclasses. =cut sub new { my ($self) = shift @_; my %args = @_; my $ref = {}; $ref->{$_} = $args{$_} for keys %args; bless ($ref, $self); $ref->set_dbh($ref->{dbh}); $ref->_set_funcprefix($ref->{_funcprefix}); $ref->_set_funcschema($ref->{_funcschema}); $ref->_set_registry($ref->{_registry}); return $ref; } =head2 set_dbh($dbh) Sets the database handle (needs DBD::Pg 2.0 or later) to $dbh =cut sub set_dbh { my ($self, $dbh) = @_; $self->{_DBH} = $dbh; } =head2 _set_funcprefix This sets the default funcprefix for future calls. The funcprefix can still be overridden by passing in an explicit '' in a call. This is used to "claim" a certain set of stored procedures in the database for use by an object. It is semi-private, intended to be called by subclasses directly, perhaps in constructors, but not from outside the object. =cut sub _set_funcprefix { my ($self, $funcprefix) = @_; $self->{_func_prefix} = $funcprefix; } =head2 _set_funcschema This sets the default funcschema for future calls. This is overwridden by per-call arguments, (PGObject::Util::DBMethod provides for such overrides on a per-method basis). =cut sub _set_funcschema { my ($self, $funcschema) = @_; $self->{_func_schema} = $funcschema; } =head2 _set_registry This sets the registry for future calls. The idea here is that this allows for application object model wrappers to set which registry they are using, both for predictability and ensuring that interoperability is possible. =cut sub _set_registry { my ($self, $registry) = @_; $self->{_registry} = $registry; } =head2 call_dbmethod Does a straight-forward mapping (as described below) to the stored procedure arguments. Stored procedure arguments are looked up, a leading 'in_' is stripped off where it exists, and the remaining string mapped back to an object property. The $args{args} hashref can be used to override arguments by name. Unknown properties are handled simply by passing a NULL in, so the stored procedures should be prepared to handle these. As with call_procedure below, this returns a single hashref when called in a scalar context, and a list of hashrefs when called in a list context. =cut sub call_dbmethod { my ($self) = shift @_; my %args = @_; croak 'No function name provided' unless $args{funcname}; if (eval { $self->isa(__PACKAGE__) } and ref $self){ $args{dbh} = $self->{_DBH} if $self->{_DBH} and !$args{dbh}; $args{funcprefix} = $self->{_func_prefix} if !defined $args{funcprefix}; $args{funcschema} = $self->{_func_schema} if !defined $args{funcschema}; } $args{funcprefix} ||= ''; my $info = PGObject->function_info(%args); my $arglist = []; @{$arglist} = map { my $argname = $_->{name}; my $db_arg; $argname =~ s/^in_//; $db_arg = $self->{$argname} if ref $self; $db_arg = $args{args}->{$argname} if exists $args{args}->{$argname}; $db_arg = $db_arg->to_db if eval {$db_arg->can('to_db')}; $db_arg = { type => 'bytea', value => $db_arg} if $_->{type} eq 'bytea'; $db_arg; } @{$info->{args}}; $args{args} = $arglist; # The conditional return is necessary since the object may carry a registry # --CT return $self->call_procedure(%args) if ref $self; return __PACKAGE__->call_procedure(%args); } =head2 call_procedure This is a lightweight wrapper around PGObject->call_procedure which merely passes the currently attached db connection in. We use the previously set funcprefix and dbh by default but other values can be passed in to override the default object's values. This returns a single hashref when called in a scalar context, and a list of hashrefs when called in a list context. When called in a scalar context it simply returns the single first row returned. =cut sub call_procedure { my ($self) = shift @_; my %args = @_; if (eval { $self->isa(__PACKAGE__) } and ref $self ){ $args{funcprefix} = $self->{_func_prefix} if !defined $args{funcprefix}; $args{funcschema} = $self->{_func_schema} if !defined $args{funcschema}; $args{registry} = $self->{_registry} if !defined $args{registry}; $args{dbh} = $self->{_DBH} if $self->{_DBH} and !$args{dbh}; } $args{funcprefix} ||= ''; croak 'No DB handle provided' unless $args{dbh}; my @rows = PGObject->call_procedure(%args); return shift @rows unless wantarray; return @rows; } =head1 WRITING CLASSES WITH PGObject::Simple Unlike PGObject, which is only loosely tied to the functionality in question and presumes that relevant information will be passed over a functional interface, PGObject is a specific framework for object-oriented coding in Perl. It can therefore be used alone or with other modules to provide quite a bit of functionality. A PGObject::Simple object is a blessed hashref with no gettors or setters. This is thus ideal for cases where you are starting and just need some quick mappings of stored procedures to hashrefs. You reference properties simply with the $object->{property} syntax. There is very little encapsulation in objects, and very little abstraction except when it comes to the actual stored procedure interfaces. In essence, PGObject::Simple generally assumes that the actual data structure is essentially a public interface between the database and whatever else is going on with the application. The general methods can then wrap call_procedure and call_dbmethod calls, mapping out to stored procedures in the database. Stored procedures must be written to relatively exacting specifications. Arguments must be named, with names prefixed optionally with 'in_' (if the property name starts with 'in_' properly one must also prefix it). An example of a simple stored procedure might be: CREATE OR REPLACE FUNCTION customer_get(in_id int) returns customer RETURNS setof customer language sql as $$ select * from customer where id = $1; $$; This stored procedure could then be called with any of: $obj->call_dbmethod( funcname => 'customer_get', ); # retrieve the customer with the $obj->{id} id $obj->call_dbmethod( funcname => 'customer_get', args => {id => 3 }, ); # retrieve the customer with the id of 3 regardless of $obj->{id} $obj->call_procedure( funcname => 'customer_get', args => [3], ); =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 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 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-2014 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 PGObject-Simple-1.8/Makefile.PL0000644000175000017500000000123412374621246015231 0ustar chrischrisuse 5.006; use strict; use warnings; use ExtUtils::MakeMaker; WriteMakefile( NAME => 'PGObject::Simple', AUTHOR => q{Chris Travers }, VERSION_FROM => 'lib/PGObject/Simple.pm', ABSTRACT_FROM => 'lib/PGObject/Simple.pm', ($ExtUtils::MakeMaker::VERSION >= 6.3002 ? ('LICENSE'=> 'bsd') : ()), PL_FILES => {}, PREREQ_PM => { 'PGObject' => 1.1, }, BUILD_REQUIRES => { 'Test::More' => 0, }, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => 'PGObject-Simple-*' }, ); PGObject-Simple-1.8/README.md0000644000175000017500000000356212302330246014530 0ustar chrischrisPGObject-Simple PBObject::Simple is a minimalist framework for mapping stored procedures in PostgreSQL to object methods. The framework is truly minimalist and hence the "Simple" designation (in fact the module contains less than 50 lines of code, and the code is dwarfed by both POD and test cases). It is intended to be of use for developers wishing for such a minimalist framework and those who may want to have a reference for how to build such a mapping framework themselves. The framework lends itself to a few specific antipatterns. Objects can become ill-formed, overly nebulous, or the like. It is thus very important when using this for actual development to ensure that acceptable data structures are well documented and that these are adhered to. This module is based on a simple idea, namely that stored procedures can tell application classes how to call them. See the POD for specific information and guidelines. 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 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 AnnoCPAN, Annotated CPAN documentation http://annocpan.org/dist/PGObject-Simple CPAN Ratings http://cpanratings.perl.org/d/PGObject-Simple Search CPAN http://search.cpan.org/dist/PGObject-Simple/ LICENSE AND COPYRIGHT Copyright (C) 2013 Chris Travers This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information. PGObject-Simple-1.8/Changes0000644000175000017500000000246312375561407014562 0ustar chrischrisRevision history for PGObject-Simple 1.8 2014-08-21 1. Made use of catalog-lookups memoization-safe. 1.7 2014-08-19 1. Solved a number of issues regarding overriding defaults for application frameworks 1.6 2014-02-24 1. Added per class schema handling (overridden by per call handling). 2. Re-arranged requirements in Makefile.PL 3. DB tests now use DB_TESTING=1 to set on, consistent with other PGObject modules 1.5 2014-02-16 1. Added contextual return handling so that db procedure calls can return either the first row of the set (usually useful where that is the only row) or the full set. 1.4 2013-11-12 1. Fixed __PACKAGE__->call_dbmethod interface so it works. 1.3 2013-06-07 1. Fixed test case that caused thins to bomb 1.2 2013-06-05 1. Added registry support 2. Additional safety checks for database tests 1.1 2013-05-30 1. Added function prefix support. 2. More documentation 1.00 2013-05-26 First version, released on an unsuspecting world. Changes from LedgerSMB's API include: 1. call_procedure uses funcname instead of procname argument 2. main mapper is called call_dbmethod instead of exec_method 3. Fewer assumptions regarding database connection handling PGObject-Simple-1.8/META.json0000664000175000017500000000161512375771527014716 0ustar chrischris{ "abstract" : "Minimalist stored procedure mapper based on LedgerSMB's DBObject", "author" : [ "Chris Travers " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.132140", "license" : [ "bsd" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "PGObject-Simple", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "Test::More" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "PGObject" : "1.1" } } }, "release_status" : "stable", "version" : "1.8" } PGObject-Simple-1.8/t/0000755000175000017500000000000012375771527013533 5ustar chrischrisPGObject-Simple-1.8/t/02-call_procedure.t0000644000175000017500000000556512302357041017112 0ustar chrischrisuse PGObject::Simple; use Test::More; use DBI; my %hash = ( foo => 'foo', bar => 'baz', baz => '2', id => '33', ); plan skip_all => 'Not set up for db tests' unless $ENV{DB_TESTING}; plan tests => 9; my $dbh1 = DBI->connect('dbi:Pg:dbname=postgres', 'postgres'); $dbh1->do('CREATE DATABASE pgobject_test_db') if $dbh1; my $dbh = DBI->connect('dbi:Pg:dbname=pgobject_test_db', 'postgres'); $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; $$; ') if $dbh; $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); $$; ') if $dbh; my $answer = 72; SKIP: { skip 'No database connection', 8 unless $dbh; my $obj = PGObject::Simple->new(%hash); $obj->set_dbh($dbh); my ($ref) = $obj->call_procedure( funcname => 'foobar', args => ['text', 'text2', '5', '30'] ); is ($ref->{foobar}, 159, 'Correct value returned, call_procedure'); ($ref) = PGObject::Simple->call_procedure( dbh => $dbh, funcname => 'foobar', args => ['text', 'text2', '5', '30'] ); is ($ref->{foobar}, 159, 'Correct value returned, call_procedure, package invocation'); ($ref) = $obj->call_procedure( funcname => 'foobar', funcschema => 'public', args => ['text1', 'text2', '5', '30'] ); is ($ref->{foobar}, 160, 'Correct value returned, call_procedure w/schema'); ($ref) = $obj->call_dbmethod( funcname => 'foobar' ); is ($ref->{foobar}, $answer, 'Correct value returned, call_dbmethod'); ($ref) = PGObject::Simple->call_dbmethod( funcname => 'foobar', args => \%hash, dbh => $dbh, ); is ($ref->{foobar}, $answer, 'Correct value returned, call_dbmethod'); ($ref) = $obj->call_dbmethod( funcname => 'foobar', args => {id => 4} ); is ($ref->{foobar}, 14, 'Correct value returned, call_dbmethod w/args'); $obj->_set_funcprefix('foo'); ($ref) = ($ref) = $obj->call_dbmethod( funcname => 'bar', args => {id => 4} ); is ($ref->{foobar}, 14, 'Correct value returned, call_dbmethod w/args/prefix'); ($ref) = ($ref) = $obj->call_dbmethod( funcname => 'oobar', args => {id => 4}, funcprefix => 'f' ); is ($ref->{foobar}, 14, 'Correct value returned, call_dbmethod w/exp. pre.'); $obj->_set_funcschema('test'); $obj->_set_funcprefix(''); ($ref) = $obj->call_dbmethod( funcname => 'foobar' ); is ($ref->{foobar}, $answer * 2, 'Correct value returned, call_dbmethod'); } $dbh->disconnect if $dbh; $dbh1->do('DROP DATABASE pgobject_test_db') if $dbh1; $dbh1->disconnect if $dbh1; PGObject-Simple-1.8/t/00-load.t0000644000175000017500000000027012302330246015026 0ustar chrischris#!perl -T use Test::More tests => 1; BEGIN { use_ok( 'PGObject::Simple' ) || print "Bail out!\n"; } diag( "Testing PGObject::Simple $PGObject::Simple::VERSION, Perl $], $^X" ); PGObject-Simple-1.8/t/boilerplate.t0000644000175000017500000000236112302330246016177 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.pm'); PGObject-Simple-1.8/t/pod.t0000644000175000017500000000035012302330246014453 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-1.8/t/pod-coverage.t0000644000175000017500000000104712302330246016250 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-1.8/t/manifest.t0000644000175000017500000000042012302330246015475 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-1.8/t/01-constructor.t0000644000175000017500000000062612302330246016502 0ustar chrischrisuse PGObject::Simple; use Test::More tests => 3; use DBI; my %hash = ( foo => 'foo', bar => 'baz', baz => '2', id => '33', ); my $dbh = 'test_dbh_fake_value'; my $obj = PGObject::Simple->new(%hash); ok($obj->isa('PGObject::Simple'), 'Object successfully created'); is($obj->set_dbh($dbh), $dbh, 'Set database handle successfully'); is($dbh, $obj->{_DBH}, "database handle cross check"); PGObject-Simple-1.8/ignore.txt0000644000175000017500000000020312302330246015262 0ustar chrischrisblib* Makefile Makefile.old Build Build.bat _build* pm_to_blib* *.tar.gz .lwpcookies cover_db pod2htm*.tmp PGObject-Simple-* .git* PGObject-Simple-1.8/META.yml0000664000175000017500000000101312375771527014536 0ustar chrischris--- abstract: "Minimalist stored procedure mapper based on LedgerSMB's DBObject" author: - 'Chris Travers ' build_requires: Test::More: 0 configure_requires: ExtUtils::MakeMaker: 0 dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.132140' license: bsd meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: PGObject-Simple no_index: directory: - t - inc requires: PGObject: 1.1 version: 1.8 PGObject-Simple-1.8/MANIFEST.SKIP0000644000175000017500000000124512302407436015151 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 # 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$ \bSu-[\d\.\_]+ \bt_util/ Debian_CPANTS.txt \blib/Su/Procs/ PGObject-Simple-1.8/MYMETA.json0000644000175000017500000000161512375771512015154 0ustar chrischris{ "abstract" : "Minimalist stored procedure mapper based on LedgerSMB's DBObject", "author" : [ "Chris Travers " ], "dynamic_config" : 0, "generated_by" : "ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.132140", "license" : [ "bsd" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "PGObject-Simple", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "Test::More" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "PGObject" : "1.1" } } }, "release_status" : "stable", "version" : "1.8" } PGObject-Simple-1.8/MANIFEST0000644000175000017500000000063212375771527014422 0ustar chrischrisChanges ignore.txt lib/PGObject/Simple.pm LICENSE Makefile.PL MANIFEST This list of files MANIFEST.SKIP MYMETA.json README README.md t/00-load.t t/01-constructor.t t/02-call_procedure.t t/boilerplate.t t/manifest.t t/pod-coverage.t t/pod.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker)