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

(lang: nl) Objecten voor beginners

by Juerd (Abbot)
on Dec 17, 2001 at 04:11 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: perltutorial [id://132425]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (8)
As of 2024-04-18 13:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found