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

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

McA

Replies are listed 'Best First'.
Re^4: Class::Accessor attributes
by perldiverx (Beadle) on Mar 07, 2014 at 14:00 UTC
    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

        From what I understand it should load the transaction_type class. But, when I do not include this, I get an error stating 'Can't locate object method "_mk_accessors" via package "Monro::CC" at C:/Perl/lib/Class/Accessor.pm line 36.' When I originally came across this error I consulted the documentation for Class::Accessor, and in the 'Moose!' subsection it says you should use extends instead of changing @ISA directly. Why this is: I have no idea, but it does result in not getting the aforementioned error message.