Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

How to dynamically invoke one of several similarly named modules

by onemojofilter (Novice)
on Aug 22, 2022 at 17:59 UTC ( [id://11146294]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    - if database = "lonprod" then
       call module App:London::Production::LogTable
    ...
      call module App::London::Test::LogTable
    - if database = "partest" then 
      call module App::Paris::Test::LogTable
    
  2. or download this
    if $database eq "lonprod" {
      App::London::Prod::LogTable->find_and_create(
    ...
    elsif $database eq "lontest" {
    ... #etc
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2025-02-15 13:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found