Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Class::Accessor attributes

by perldiverx (Sexton)
on Mar 07, 2014 at 13:52 UTC ( #1077384=note: print w/ replies, xml ) Need Help??


in reply to Re: Class::Accessor attributes
in thread Class::Accessor attributes

I thought about that when I created this initially, however the documentation on CPAN tells me to replace  @ISA = qw /Foo Bar/; with extends qw(/Foo Bar/);
Even when I change this to your recommendation the script still warns that it cannot locate the package.


Comment on Re^2: Class::Accessor attributes
Select or Download Code
Re^3: Class::Accessor attributes
by McA (Priest) on Mar 07, 2014 at 13:56 UTC

    Do you have a package called transaction_type? There must be something like transaction_type.pm somewhere in your INC path.

    McA

      No package by that name. transaction_type is an attribute of my object. Hence:
      has transaction_type => { is => 'rw', };

        I think there is a misunderstanding on your side. What do you think does the line

        extends(qw/transaction_type/);

        for you? What do you expect?

        The line says that the class/package 'Monro::CC' is inheriting from class/package 'transaction_type'. But I assume you don't want this.

        McA

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2014-12-28 16:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (182 votes), past polls