Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Re: How to a construct objects with variables as class names?

by MeowChow (Vicar)
on Feb 14, 2001 at 12:48 UTC ( [id://58315]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: How to a construct objects with variables as class names?
in thread How to a construct objects with variables as class names?

Sure, this is secure so long as the table you're checking the values against is comprised of data that only you (not your users) can manipulate, and it sounds like this is what you're doing.

Regarding your second question, you may want to have a look at Related question: loading modules at run time. You will also want to do something like:

eval "require $pkg";
because of the differences in the way require EXPR works from require BAREWORD.

   MeowChow                                   
               s aamecha.s a..a\u$&owag.print

Replies are listed 'Best First'.
Re: Re: Re: Re: How to a construct objects with variables as class names?
by joecamel (Hermit) on Feb 15, 2001 at 07:12 UTC
    Awesome, I eliminated the uses from my module, and added

    eval "require $fullClass";

    to the subroutine -- it worked perfectly.

    Thanks, MeowChow and Adam, for your help.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-03-28 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found