[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
GlobalSub
Hello!
We have recently upgraded from Minivend 3.07 to 3.14 and at the
same time moved from solaris to linux. We have a results.html page with
about 10k worth of embedded Perl which ran reasonably under solaris, but
under linux it runs very poorly, taking several minutes to complete.
We are using RedHat 6.0, Perl 5.00404, SMP Kernel and 256 MB memory.
In an effort to try to speed up performance, the way to go seems to create
a GlobalSub, avoiding the SAFE checks and hopefully speeding up the processing.
I have been looking for some demo subroutines outlining the passing of
paramaters back and forth and am clueless.
I have started testing with a nice simple routine in minivend.cfg:
GlobalSub sub display_results {my $artist = @_; return $artist;}
I call this from results.html with :
[perl sub]
display_results ([item-field artist]);
[/perl]
[item-field artist] should be a string and all I am trying to do here is
pass it through to the subroutine and then pass it back - unfortunately all
that is printed in the browser is the digit 0.
I have tried $artist = shift(); (as I had seen in the mailing list archives)
in the GlobalSub and also tried [perl sub interpolate=1], both without
any success. Quoting [item-field artist] (single, double, and back quote)
change the 0 to a 1.
I also tried move moving the subroutine to the catalog.cfg and I get the same
results. This defeats the purpose of avoiding the Safe.pm checking in the
first place, but was worth a try.
I also tried using the $Safe value of [item-field artist]
($Safe{'values'}->{'[item-field artist]'}), with the various quotes - still
no luck.
Any help is appreciated!! TIA.
Cordially,
George
____________________________________________________________________________
Customer Service Software Workshop Inc.
george@thebook.com 315.695.1301, (315) 689-6396 "software that fits!" (TM)
http://www.thebook.com