in reply to Re: Object not created as well with Moose
in thread Object not created as well with Moose
#!/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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Object not created as well with Moose
by ww (Archbishop) on Dec 10, 2008 at 22:55 UTC | |
|
Re^3: Object not created as well with Moose
by stvn (Monsignor) on Dec 12, 2008 at 04:59 UTC |