Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Perl OO with Class::Struct

by VinsWorldcom (Prior)
on Dec 13, 2013 at 14:45 UTC ( [id://1067022]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    for (@{$litter->cats}) { 
        print $_->name . "\n"
    }
    
  2. or download this
    my $litter = Litter->new(cats => [$cat1, 1]);
    
  3. or download this
    Can't call method "name" without a package or object reference at ...
    
  4. or download this
    package Litter;
    use Class::Struct;
    struct (cats => '@Cat');
    1;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1067022]
Approved by Corion
Front-paged by boftx
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found