Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

defclass and defmethod

by opensourcer (Monk)
on Jul 11, 2007 at 05:48 UTC ( #625957=perlquestion: print w/replies, xml ) Need Help??
opensourcer has asked for the wisdom of the Perl Monks concerning the following question:

hi, what are these defclass and defmethod, i saw them in one of the examples.
defclass EXAMPLE; defmethod new: class { ..... } defmethod printone { ..... } sub othermethod { .... }
i have searched for documentation couldn't find about them. Can any 1 explain the hole concept or give me the url to the doc.

Replies are listed 'Best First'.
Re: defclass and defmethod
by ikegami (Pope) on Jul 11, 2007 at 08:37 UTC
    That's not valid Perl syntax. If you can run this, you're probably using a Source Filter. Source filters are modules that generate Perl code from non-Perl files before Perl sees it.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://625957]
Approved by bobf
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2016-10-21 16:48 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (289 votes). Check out past polls.