[ic] HTTP POST

Dan Browning interchange-users@icdevgroup.org
Thu Feb 13 15:43:01 2003


At 04:28 PM 2/13/2003 +0000, you wrote:
>I've modified this to accept url and content, and tried to get it
>working as tag and as subroutine included from catalog.cfg, but to my
>frustration, all I'm getting is "Safe: require trapped by operation
>mask" anytime I try to 'use LWP::UserAgent'.

I didn't try to see whether you were calling it in a Safe context (e.g. 
[perl][/perl]) or not, but if you do, you'll run into this:

Question:

Runtime requires not allowed by Safe, aka... when I try to use module XYZ, 
I get the error "Safe: require trapped..."

Answer 1:

<Mike Heins>
 > 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.

 > I think the only thing would be to ... build the initial object
 > at catalog startup time....
</Mike Heins>

Answer 2:  Call the code via usertag or [calc].

         [tag-that-does-runtime-require]

         -or-

         [calc] q{[tag-that-does-runtime-require]} [/calc]

Answer 3:  Put it in a global usertag.

HTH,

--
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| Dan Browning, Kavod Technologies,      <dan.browning@kavod.com> |
| 6700 NE 162nd Ave, Suite 210, Vancouver, WA (360) 843-4074 x217 |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
You will think of something funnier than this to add to the fortunes.