in reply to “Can't use string (”package“) as a HASH ref while ”strict refs"

DBM::Deep uses loads of ties and overloading, so I wouldn't necessarily trust the output of Data::Dumper to provide you with any sort of useful representation of its contents.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
  • Comment on Re: “Can't use string (”package“) as a HASH ref while ”strict refs"

Replies are listed 'Best First'.
Re^2: “Can't use string (”package“) as a HASH ref while ”strict refs"
by Anonymous Monk on Aug 09, 2013 at 08:11 UTC

    DBM::Deep uses loads of ties and overloading, so I wouldn't necessarily trust the output of Data::Dumper to provide you with any sort of useful representation of its contents.

    Why not?

    FWIW , the op's dumper output shows circular references , so I'd suspect the OPs real code before I'd worry about Data::Dumper getting something wrong