[ic] UserTag and require problem
Bill Carr
bill at worldwideimpact.com
Fri Feb 9 15:33:18 EST 2007
On Feb 9, 2007, at 2:52 PM, Bruno Cantieni wrote:
>>> Does anyone have a clue why the below (cut down to the
>> bone) is not
>>> working?
>>>
>>> UserTag serialize Routine <<EOR
>>> require Vend::serialize;
>>> sub {
>>> my(%v) = @_;
>>> my $serialized = Vend::serialize::serialize(\%v);
>>> return $serialized;
>>> }
>>> EOR
>>>
>>> [perl]
>>> my %data = (
>>> 1 => 'Yes',
>>> 0 => 'No',
>>> );
>>> return $Tag->serialize(%data);
>>> [/perl]
>>>
>>> This results in:
>>> Safe: Undefined subroutine &Vend::serialize::serialize
>> called at (tag
>>> 'perl') line 4.
>>>
>>> I plopped the serialize.pm (Scott Hurring,
>>> http://hurring.com/code/perl/serialize/) into the Vend directory
>>> and it
>>> appears to load OK when testing as in:
>>>
>>> #####
>>> my $can_do = 0;
>>> eval {
>>> require Vend::serialize;
>>> $can_do = 1;
>>> };
>>> if ($@) {
>>> return sub{
>>> ::logDebug("Cannot load serialize: $@");
>>> }
>>> }else{
>>> ::logDebug("Starting serializer $can_do"); # getting here with 1
>>> }
>>> #etc.
>>> #####
>> I think you may have to add the AllowGlobal directive for your
>> catalog to do stuff like that.
>>
>> Bill Carr
>
> Well, the catalog in question is actully in the AllowGlobal list :(
What's Vend::serialize? I don't have anything like that in my 5.4.1
setup.
Bill Carr
Bottlenose - Wine & Spirits eBusiness Specialists
(877) 857-6700
More information about the interchange-users
mailing list