Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: construct a standard object oriented program

by orkysoft (Friar)
on Mar 30, 2002 at 16:10 UTC ( #155435=note: print w/ replies, xml ) Need Help??


in reply to Re: construct a standard object oriented program
in thread construct a standard object oriented program

To define a class in perl from which objects can be created and against which functions can be called, you basically need a perl module with a constructor function,

No, you need a namespace -- defined with package name;

I've defined a class (albeit a very, very small one) inside of a larger file once.

Lur: "But if this cape shrinks, consider your species extinct!"


Comment on Re: Re: construct a standard object oriented program
Select or Download Code
Replies are listed 'Best First'.
Re: Re: Re: construct a standard object oriented program
by chhe (Sexton) on Mar 30, 2002 at 21:17 UTC

    Correct, that wasn't precise: you can have as many classes you want in a file - the reason for bless taking an optional additional parameter...., well i said basically....

    Chris

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2015-07-29 23:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls