Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: How to localize conditionally?

by BrowserUk (Patriarch)
on Mar 13, 2011 at 20:16 UTC ( [id://892989]=note: print w/replies, xml ) Need Help??


in reply to How to localize conditionally?

Any reason why you can't pass the value into libcall() directly rather than via a localised %ENV element? (Which seems a strange way to do things?)

sub libcall { my $arg = shift; if( $arg ) { print "Arg is $arg\n"; } else { print "Arg undefined\n"; } } libcall( condition() ? 42 : undef );

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: How to localize conditionally?
by saintmike (Vicar) on Mar 13, 2011 at 20:37 UTC
    I just used libcall() to illustrate what's going on within the library. The real library is of course different and doesn't accept the value on its parameter list, but insists on getting it in %ENV.

    "What is this library, who in their right mind would support an interface like that!", you ask now! and I'll let you in that the library is Crypt::SSLeay and the variable is HTTPS_CA_FILE.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://892989]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-16 20:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found