in reply to Class::Accessor attributes

Hi,

with the line

extends(qw/transaction_type/);

you say that you want to inherit from a package with name transaction_type. And the error message stats

'Can't locate package transaction_type for @Monro::CC::ISA at C:/Perl +/lib/Class/Accessor.pm line 36 (#1)'

which says that you don't have a module called transaction_type in the INC path.

McA

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

      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', };