Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] Help with external export scripts for databases



******    message to minivend-users from Ed LaFrance <edl@newmediaems.com>     ******

Hello All -

I am working on some Perl scripts for exporting gdbm and db databases for 
an older, busy minivend site (3.14), the idea being that these could be run 
externally from command line, crontab, etc 'offline' from the site.  This 
is pretty straightforward, but the wrinkle is that the site(s) are using 
Storable, and when I try to use any storable functions in the script i get:

Storable binary image v56.97 more recent than I am (v1.0) at 
blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/thaw.al) line 
238, at export_db line 17

...which seems odd, since minivend is running fine and without errors.  I 
am admittedly a perl hack - in this case I was just trying to "thaw" the 
value element form the database when I got this error, and maybe I caused 
the problem  Here is a code snippet:

#!/usr/bin/perl -w
use strict ;
use DB_File ;
use vars qw( %h $k $v @v) ;
use Storable;

my $database = shift(@ARGV);
my $code = shift(@ARGV) || 'code';
my @data;
my $header;

tie %h, "DB_File", $database, O_RDWR, 0640, $DB_HASH or die "Cannot open 
file: $!\n";

while (($k, $v) = each %h)
{
         @v = Storable::thaw($v);
         $v = join ":", @v;
....
}

The call to thaw() is one line 17.  Any pointers would be appreciated.

- Ed L.
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          edl@newmediaems.com
Placerville, CA  95667         http://www.newmediaems.com
(530) 622-9421                 (530) 622-9426 Fax
(866) 519-4680 Toll-Free
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: