Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Threads Calling Subroutine from different PM File

by BrowserUk (Pope)
on Nov 26, 2012 at 11:55 UTC ( #1005622=note: print w/replies, xml ) Need Help??


in reply to Threads Calling Subroutine from different PM File

my $thr = threads->new( \&MyModule::Execute, $arg1, $arg2 );

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
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.

RIP Neil Armstrong

Replies are listed 'Best First'.
Re^2: Threads Calling Subroutine from different PM File
by anshumangoyal (Scribe) on Nov 26, 2012 at 18:02 UTC
    Ok, then how will this work:
    $class = MyModule::MySubModule;
    and I want to call SubRoutine from $class.
    my $Thread = threads->new( \&$class::SubRoutine, $arg1, $arg2 );
    This is giving error for wrong syntax.
      Ok, then how will this work: $class = MyModule::MySubModule;

      The obvious answer to that question is: It won't work.

      This is giving error for wrong syntax.

      Unsurprising. If your code isn't syntactically correct, you will get an error.

      Is there a subroutine called MySubModule in the package MyModule?

      If not, what do think $class will end up containing?

      The lesson here is that if you make stuff up when asking a question, instead of showing the actual problem code; the answers you get probably won't work for your actual code. So stop being ... and ask the real question you want answered!


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      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.

      RIP Neil Armstrong

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005622]
help
Chatterbox?
Corion gives up
[Discipulus]: ah! so you mean if i need a static image i can use Twig, if on the fly better css selector and mody attrs (jquery?), rigth?
[LanX]: not sure what you guys are taking about, but a DOM manipulation in JS shouldn't be difficult
[Corion]: Discipulus: Yeah, that's what I would try (but so far, I can't even change the colors manually in the SVG, which is why I gave up ;) )
Discipulus bad sign..
[Discipulus]: italian doc says to modify somehow the initial SVG before using it with D3.js
[Discipulus]: LanX the fact is that my js ability is even poorer than my Perl one..
[LanX]: oh its negative? ;P

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (13)
As of 2017-03-23 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (285 votes). Check out past polls.