DBIx-PgLink
view release on metacpan or search on metacpan
Install.html view on Meta::CPAN
can connect to his own server with specified in t/test.conf credentials.
If used .pgpass file, place it to 'postgres' home directory.</p>
</li>
<li>
<p>Change permission on some directories for PostgreSQL owner account</p>
<dl>
<dt><strong><a name="item_read_permissions_for__2e_2fblib">read permissions for ./blib</a></strong>
<dd>
<pre>
chmod -R o=r,+X blib</pre>
</dd>
<dt><strong><a name="item_read_and_write_permissions_for__2e_2fexamples">read and write permissions for ./examples</a></strong>
<dd>
<pre>
chmod -R o=rw,+X examples</pre>
</dd>
<dd>
<p>Only if you plan testing of XBase or SQLite data sources</p>
</dd>
</dl>
<li>
<p>Run test</p>
<pre>
make test</pre>
<p>or</p>
lib/DBIx/PgLink/Manual/Install.pod view on Meta::CPAN
=item *
Change permission on some directories for PostgreSQL owner account
=over
=item read permissions for ./blib
chmod -R o=r,+X blib
=item read and write permissions for ./examples
chmod -R o=rw,+X examples
Only if you plan testing of XBase or SQLite data sources
=back
=item *
Run test
make test
t/03setup.t view on Meta::CPAN
local $dbh->{RaiseError} = 0;
$dbh->do('drop user test_pglink1');
$dbh->do('drop user test_pglink2');
}
$dbh->do(q/create user test_pglink1 with password 'secret1'/);
$dbh->do(q/create user test_pglink2 with password 'secret2'/);
my $blib = Cwd::abs_path . "/blib/lib";
# TODO: `chmod -R 644 blib/lib` in portable way
ok($dbh->do(<<'END_OF_SQL'), 'check_file_read_access');
CREATE OR REPLACE FUNCTION public.check_file_read_access(_file text) RETURNS void LANGUAGE plperlu AS $body$
my $filename = shift;
open my $fh, '<', $filename or die "PostgreSQL process have no read access to file '$filename'";
$body$
END_OF_SQL
lives_ok {
$dbh->selectrow_array("SELECT public.check_file_read_access(?)", {}, "$blib/DBIx/PgLink.pm" );
( run in 0.257 second using v1.01-cache-2.11-cpan-8d75d55dd25 )