in reply to RE: RE: RE: Re: Perl Safety
in thread Perl Safety

untested psuedo-code
use strict; # To make sure you use the right package names. package My_Wrapper; sub My_get_data { local $x, $y, $z; # I had 'my', but [tilly] is right. # Thats why I said, "I think." here. get_data( @_ ); return ( $x, $y, $z ); } package My_main my ( $x, $y, $z ) = My_Wrapper::My_get_data;
That's a stab in the dark. I'm tired and I don't feel like taking the time to construct your situation for testing. But I think that is the direction to go. My_Wrapper will collect ugly globals, but they shouldn't propogate to My_main.

Replies are listed 'Best First'.
RE: RE: RE: RE: RE: Re: Perl Safety
by gaspodethewonderdog (Monk) on Aug 25, 2000 at 23:58 UTC
    thanks Adam, I'll play around with that and local and see if I can't beat something into submission... it certainly isn't a very attractive way to do it, but if it works I guess I can't complain too much...
RE (tilly) 6: Perl Safety
by tilly (Archbishop) on Aug 26, 2000 at 00:14 UTC
    That has to be a local, the my is not visible to get_data. (Which is kinda the idea...) Possible gotcha. He may assume that some globals are set later.

    BTW if you will have to work with this kind of idiocy and cannot get relief, I suggest finding a more congenial workplace. They may take finding, but they do exist...