Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: @INC problem with SOAP::Lite

by john_oshea (Priest)
on Jan 10, 2007 at 10:28 UTC ( #593871=note: print w/replies, xml ) Need Help??


in reply to @INC problem with SOAP::Lite

Update 2

It appears that changing the dispatch_to parameters to the following allows for Data::Dumper use:

-> dispatch_to('/Users/johno/Code/DCI/Wordbank-DCI-Server/lib', '/usr/local/lib/perl5/5.8.8/darwin-2level/');

This makes me feel somewhat happier than hacking at the SOAP::Lite code, which, quite frankly, I don't understand. This seems not to introduce any gaping security holes(*), but I'd appreciate it if anyone who feels faint / nauseous at this would let me know what I'm letting myself in for ;-)

(*) I can't, for instance, call getcwd from Cwd.pm, which lives in the second path parameter.

Replies are listed 'Best First'.
Re^2: @INC problem with SOAP::Lite
by Corion (Pope) on Jan 10, 2007 at 11:53 UTC

    This makes me feel queasy. I think the problem results from SOAP::Lite lazy-loading your module after it has modified @INC:

    unless (defined(%{"${class}::"}) || exists($INC{join '/', split /::/ +, $class.'.pm'})) { # allow all for static and only specified path for dynamic binding +s local @INC = (($static ? @INC : ()), grep {!ref && m![/\\.]!} $sel +f->dispatch_to); eval 'local $^W; ' . "require $class"; die "Failed to access class ($class): $@" if $@; $self->dispatched($class) unless $static; }
    I think you should be able to fix the problem by force-loading your class(es) instead of waiting until SOAP::Lite decides to load them:

    use Wordbank::DCI::Server; use Wordbank::DCI::Another::Package; # and so on

      Hmmm. Yes. Now that I've done some more reading in the meantime, I get it. I think.. ;-)

      For anyone else who may get stuck on this, Corion's suggestion is the 'static linking' option mentioned in the security section of the SOAP::Lite documentation.

      Thanks for the help - much appreciated.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://593871]
help
Chatterbox?
[1nickt]: But the bands are even louder! I saw Spearhead (Michael Franti) at an outdoor show and had to walk a mile away to not feel pain in my chest! Babies were crying ... I asked the sound engineer why it was necessary to have the bass so loud and he laughed...
[Discipulus]: but the best i attended live was Mano Negra Patchanka at Forte Prenestino .. in 1990
[Corion]: Hmmm - Mano Negra or at least Manu Chao seem to put on a good live show. At least the one live CD I have from Manu Chao sounds good ;)
Discipulus feels the same jealousity of the johngg's daughter
[1nickt]: choroba I agree
[choroba]: Playing in a punk rock band for 20 years... my hearing is quite bad
[Corion]: I still have hopes to turn my godson and his two siblings into a punk band ;)
[Corion]: Their older sister just started piano but has been interested in drumming, which she should be able to start with 8 years or so)
[Discipulus]: ah was Kink of Bongo 1992..
[1nickt]: choroba name of band? youtube link? MySpace link?

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2017-03-24 12:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (301 votes). Check out past polls.