Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Perl OO with Class::Struct

by VinsWorldcom (Priest)
on Dec 13, 2013 at 14:45 UTC ( #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
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? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2014-12-28 19:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls