Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

(lang: nl) Objecten voor beginners

by Juerd (Abbot)
on Dec 17, 2001 at 04:11 UTC ( #132425=perltutorial: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     package Foo;
    
  2. or download this
     sub new {
         my $package = shift;
    ...
         bless $object, $package; # De magie
         return $object;
     }
    
  3. or download this
     my $object = Foo->new;
     # of
     my $object = new Foo;
    
  4. or download this
     package Schaap;
    
    ...
     $dolly->blaat('Hallo');         # Schaap::blaat($dolly, 'Hallo')
     blaat $dolly('Ook dit werkt');  # Schaap::blaat($dolly,
                                     # 'Ook dit werkt');
    
  5. or download this
     sub kleur {
         my ($self, $kleur) = @_;
    ...
    
     $obj->kleur("Blauw");
     print "De kleur is ", $obj->kleur(), ".\n"; # De kleur is blauw.
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2014-08-20 06:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (105 votes), past polls