[ic] Tag->salestax() causes Safe error in IO/Socket.pm

Mike Heins interchange-users@icdevgroup.org
Mon Aug 5 22:43:02 2002


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.


-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

I don't want to get to the end of my life and find I have just
lived the length of it. I want to have lived the width of it as
well. -- Diane Ackerman