[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Tag->salestax() causes Safe error in IO/Socket.pm
Quoting Dan Browning (dbml@kavod.com):
> At 10:42 PM 8/5/2002 -0400, you wrote:
> >Quoting Dan Browning (dbml@kavod.com):
> > > I've got one for the funny papers:
> > >
> > > This code:
> > >
> > > [perl tables="products options"]
> > > return ( $Tag->salestax({ noformat => 1, }) );
> > > [/perl]
> > >
> > > Produces this error:
> > >
> > > x.x.x.x ZfdIYb6S:x.x.x.x - [05/August/2002:20:59:39 -0400] foundation
> > > /cgi-bin/cart.cgi/test Safe: require trapped by operation mask at
> > > /usr/lib/perl5/5.6.1/i686-linux/IO/Socket.pm line 9.
> > > > Compilation failed in require at
> > > /usr/lib/perl5/site_perl/5.6.1/LWP/Simple.pm line 302.
> > > >
> > > >
> > > > return ( $Tag->salestax({ noformat => 1, }) );
> > > >
> > > >
> > >
> > > [salestax noformat=1] works fine, but it really tickles my funny bone that
> > > IO/Socket.pm would have a balk at a mere salestax call. :-) Environment:
> > > 4.8.3, CPanel4. Accepting all comments,
> > >
> >
> >If your database is talking over the net, and some misguided DB driver
> >does a runtime "require", you could see this because of Safe.
> >
> >I hate runtime requires because of this. We are probably the only
> >significant piece of software that uses Safe routinely, and also are one
> >of the few long-lived Perl daemons. As such people do all sorts of
> >bizarre things like not allow class method calls for subroutines and
> >routinely call require on repetitive object creation....SOAP::Lite is an
> >example of this and it makes programming for it a pain.
>
> Aha, I'm pretty sure its the UPS queries, then. "Tax on shipping" is
> enabled, so for salestax to calculate, it first runs the shipping, which
> then runs the LWP::Simple request to ups.com. Any solutions/workarounds?
>
I think the only thing would be to rewrite Business::UPS to use
the LWP::UserAgent module and then build the initial object
at catalog startup time....
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike@perusion.com>
Friends don't let friends use Outlook. -- Bob Blaylock