--- trunk/lib/WebPAC/Store.pm 2005/12/06 16:40:18 233 +++ trunk/lib/WebPAC/Store.pm 2005/12/06 23:48:11 236 @@ -14,11 +14,11 @@ =head1 VERSION -Version 0.07 +Version 0.08 =cut -our $VERSION = '0.07'; +our $VERSION = '0.08'; =head1 SYNOPSIS @@ -128,7 +128,7 @@ Retrive from disk one data_structure records usually using field 000 as key - my $ds = $db->load_ds( id => 42, prefix => 'name' ); + my $ds = $db->load_ds( id => 42, prefix => 'name', database => 'ps' ); This function will also perform basic sanity checking on returned data and disable caching if data is corrupted (or changed since last @@ -137,6 +137,9 @@ C is used to differenciate different source input databases which are indexed in same database. +C if B argument which will override database name used when creating +C object (for simple retrival from multiple databases). + Returns hash or undef if cacheing is disabled or unavailable. =cut @@ -161,7 +164,7 @@ $log->logconfess("got hash, but without id") unless (defined($id)); $log->logconfess("got hash, but id [$id] isn't number") unless ($id =~ /^\d+$/); - my $database = $self->{database}; + my $database = $args->{database} || $self->{database}; my $prefix = $args->{prefix} || ''; $log->logconfess("can't find database name") unless ($database);