Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Dynamic Package Name & Subroutine Call

by ikegami (Pope)
on Dec 16, 2012 at 13:57 UTC ( #1009063=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $full_pkg = "Test::".$pkg;
    my $hello = $full_pkg->can('hello');
    $full_pkg->$hello(...);
    # Or: $hello->($full_pkg, ...);
    
  2. or download this
    my $full_pkg = "Test::".$pkg;
    $full_pkg->hello(...);
    
  3. or download this
    $full_pkg->$method_name(...);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1009063]
help
Chatterbox?
[marto]: vroom is here?
[Corion]: From time to time, yes :)
[Discipulus]: hello vroom and thanks for this amazing place!
[marto]: I can't remember exactly, but it has been years since I last saw the name listed in 'Other users'

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2018-07-19 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (404 votes). Check out past polls.

    Notices?