Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Can I from within a module access variables from the calling program?

by HJO (Acolyte)
on Oct 25, 2012 at 12:47 UTC ( #1000855=note: print w/replies, xml ) Need Help??


in reply to Re: Can I from within a module access variables from the calling program?
in thread Can I from within a module access variables from the calling program?

Hi,

Well thanks for your answer, I didn't understood it at first but now it get it ^^

I just have two "problems" with your answer, first I'm using Perl 5.8.8 and I'm not sure that your technique is compatible with this version since you're using Perl 5.10

Secondly, I would have prefered not to use another Module to do so

but thansk anyway, maybe your answer will help somebody else later

  • Comment on Re^2: Can I from within a module access variables from the calling program?

Replies are listed 'Best First'.
Re^3: Can I from within a module access variables from the calling program?
by tobyink (Abbot) on Oct 25, 2012 at 13:29 UTC

    The only 5.10-specific feature I used was say which is a new (well... five years old) keyword which works like print but automatically appends a new line.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

      Oh indeed that's quite usefull. Thanks I think i'll be able to adapt this

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000855]
help
Chatterbox?
[Corion]: Yay. FF now has u2f built-in (behind an about:config setting), so using an USB token to sign in actually works :)
[Corion]: So, it's not all bad with the new FF :)
[holli]: 2factor is a bit too much for me. i just use passwords like jhbn8789q27312laks dmaw98^
[moritz]: isn't there also some about:config setting to enable the old plugin API?
[Discipulus]: indeed, only the logo is nicer
[Corion]: moritz: Hmm, I doubt so, as I think they moved away from XUL and other UI stuff, which was used by most plugins I used
[Corion]: holli: I'm trying it out with Github and so far I don't dislike it. It's basically like an extra key I press to log in, which is an OK flow for Github
[Corion]: I haven't tried out recovery in case of a broken USB key though (even though I have three such U2F tokens lying around here)
[oiskuu]: randomly banging on the keyboard yields pretty poor entropy. much better to just base64 some /dev/random
moritz has a pass entry with recovery codes

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (11)
As of 2017-11-20 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (293 votes). Check out past polls.

    Notices?