I am currently working on a Perl 5.8 project. I have package that looks like:
package Foo::Bar;
use strict;
use warnings;
use Class::Std;
our @EXPORT_SAFE = qw(Class::Std);
my %baz :ATTR;
sub BUILD {
my ($self, $ident, $args) = @_;
$baz{$ident} = $$args{something};
}
I am not exposing baz with any getter, but I would like to fetch it's content for unit testing purposes. There is any way to do it in Perl?
e.g. in Ruby you can some_instance.instance_variable_get("@#{name}")
Thank you very much in advance