Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Creating an Intermediate Perl Programming Curriculum

by bronto (Priest)
on May 04, 2004 at 16:58 UTC ( [id://350436]=note: print w/replies, xml ) Need Help??


in reply to Creating an Intermediate Perl Programming Curriculum

Nice topic :-)

To all other monks said I'd just add a few things. First, about OOPerl you skip from basics to AUTOLOAD directly. I believe that they should first understand how AUTOLOAD works, even without knowing about objects; when coming to objects it will be clearer what they can do with it and, more important, they will easily get why if they use AUTOLOAD in OOP they also should define a DESTROY method (in general)

Second, I'd teach them when to use objects and when leave them alone. I am dealing with another programmer's script that uses classes as... "configuration objects" (I don't even know how to call them!!!), e.g.: my $dir = MyProg->workdir ; my $login = MyProg->login and so on; those "classes" don't even have a constructor!!! Even if this could be not completely wrong, I personally consider it as really-bad-style, definitely. And when I need objects to get configuration variables I use AppConfig or similar modules (which you could also like to illustrate to your students).

My 2 cents (of Euro:-)

Ciao!
--bronto


The very nature of Perl to be like natural language--inconsistant and full of dwim and special cases--makes it impossible to know it all without simply memorizing the documentation (which is not complete or totally correct anyway).
--John M. Dlugosz

Log In?
Username:
Password:

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

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

    No recent polls found