in reply to no New method in Lemonldap::NG::Portal::SharedConf module

Hi song,

I can't find the new method in the code, is that inherits from the parent ?

I don't know this module, but I am looking at the source of Lemonldap::NG::Portal::SharedConf on CPAN, which appears to be where you got this piece of code from. (Note that posting smaller code snippets that show only the code relevant to the question helps because readers have less code to wade through, and it may help you narrow down the problem. If it's necessary to post longer pieces of code, it's good to use <readmore> tags.)

Near the top of Lemonldap::NG::Portal::SharedConf, you'll find the line use base qw(Lemonldap::NG::Portal::Simple);. base establishes an @ISA relationship with Lemonldap::NG::Portal::Simple, meaning Lemonldap::NG::Portal::SharedConf is then a subclass of Lemonldap::NG::Portal::Simple. The latter does have a new method, so that's what gets called when you say Lemonldap::NG::Portal::SharedConf->new().

Hope this helps,
-- Hauke D

Replies are listed 'Best First'.
Re^2: no New method in Lemonldap::NG::Portal::SharedConf module
by song (Initiate) on Feb 04, 2017 at 14:01 UTC

    hi Hauke, it really helps. thanks a lot, should be more careful next time