Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^4: OO systems and Perl 5 (Was: Recap: Future of Perl 5)

by RonW (Parson)
on Aug 31, 2018 at 00:04 UTC ( #1221412=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    class Dog:
    
    ...
    
    # Instantiate the Dog object
    philo = Dog("Philo", 5)
    
  2. or download this
    package Dog;
    
    ...
    package main;
    
    my $philo = Dog->__init__('Philo', 5);
    
  3. or download this
    sub __init__ ($class, $name, $age)
    {
        my $self = bless {name => $name, age => $age}, $class;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2019-05-27 11:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (156 votes). Check out past polls.

    Notices?