in reply to What is a reliable way to get the package of the code creating a Moose object?
use strict; use warnings; package Child; use Moose; has 'context' => (is => 'rw'); package Teacher; my $tom = Child->new(context => 'Teacher'); print $tom->context . "\n"; package Parent; my $kit = Child->new(context => 'Parent'); print $kit->context . "\n";
One world, one people
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: What is a reliable way to get the package of the code creating a Moose object?
by tobyink (Canon) on Jul 15, 2018 at 08:23 UTC |