[interchange-bugs] [rt.icdevgroup.org #346] [Comment] Can't setup DBI handle of DBI::st=HASH(0xaff6bb0) to DBD::mysql::st_mem: unknown _mem package

Gert van der Spoel via RT interchange-comment at rt.icdevgroup.org
Wed Apr 6 13:17:13 UTC 2011


http://rt.icdevgroup.org/Ticket/Display.html?id=346
This is a comment.  It is not sent to the Requestor(s):

> Found another (better) workaround.  In catalog_before.cfg, add:
> Autoload <<EOA
> [perl cat][/perl]
> EOA
> 
> This forces Interchange to load in the cat table ahead of time and then
> the bar_link sub doesn't barf on it.  For some reason interchange isn't
> loading it in otherwise.  I'm wondering if there's a better way to do
> this, though, rather than forcing it to load on every page, and
> hard-coding cat as the table that is expected to be required?

This better workaround needs an additional line:

--- catalog_before.cfg  2010-01-23 20:04:07.000000000 +0100
+++ /opt/interchange/catalog_before.cfg 2011-04-06 15:01:41.000000000 +0200
@@ -58,6 +58,10 @@
 Variable  MV_DEFAULT_SEARCH_FILE  products
 Variable  MV_DEFAULT_SEARCH_TABLE products

+Autoload <<EOA
+  [perl cat][/perl]
+EOA
+
 Sub <<EOR
 sub bar_link {
        my $base = shift || 'cat';
@@ -67,6 +71,7 @@
        my $ref = shift;
        my $code = $ref->[0];

+        $Tag->perl($base);
        my $record =  tag_data($base, 'n/a', $code, { hash => 1 });
        return $ref->[0] unless $record;

Thanks Peter for coming up with this workaround.

NOTE: The issue is a result of a newer version of Safe.pm in Perl 5.12.3 (2.27 versus 2.12 that was around in my Perl 5.10 install). 

By copying Safe.pm from my Perl 5.10 to my Perl 5.12.3 the original catalog_before.cfg code would work, but as this could no doubt be causing all kinds of other side-effects, I'd say: "don't try this at home", and just go with the above workaround for the time being.




More information about the interchange-bugs mailing list