Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How to localize conditionally?

by BrowserUk (Pope)
on Mar 13, 2011 at 20:16 UTC ( #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
Node Status?
node history
Node Type: note [id://892989]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2020-08-09 21:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (55 votes). Check out past polls.

    Notices?