#!/usr/bin/perl -w use strict; use Package::System::Foo; use Data::Dumper; my $foo = Package::System::Foo->new(); $foo->start(); print Dumper $foo;
package Package::System::Foo; use Moose; extends 'Package::Contol::Base::Daemon::Server'; use Package::System::Config; has 'CONFIG' => (is=>'rw',isa=>'Object'); # OR I tried isa=>'Any' sub _init{ my $self = shift; $self->CONFIG(Package::System::Config->new()); #not executing after that } sub start{ my $self = shift; $self->_init(); # not executing after _init() ......... } 1;
'Package' it's just sample. I cannot show real module name for some reason, sorry.package Package::Contol::Base::Daemon::Server; use Moose; has 'DAEMON' => (is=>rw,isa=>'Object'); 1;
In reply to Re^2: Object not created as well with Moose
by woodpeaker
in thread Object not created as well with Moose
by woodpeaker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |