in reply to Question about new()

as
use as; # activate 'use' magic use Very::Long::Module::Name as => 'Foo'; use Other::Long::Module::Name qw(parameters being passed), as => ' +Bar'; my $foo = Foo->new; # blessed as Very::Long::Module::Name my $bar = Bar->new; # blessed as Other::Long::Module::Name

Replies are listed 'Best First'.
Re^2: Question about new()
by sman (Beadle) on Jan 23, 2010 at 02:14 UTC
    Thanks. Your solution works for me. But, my eclipse with EPIC complains on this line :
    use Result::Users as => 'Users';
    with this error message : 'Can not locate Result/Users.pm in @INC....'.

    I know it's not a big deal, but do you know why?
      I dont use eclipse, but I would guess because Result/Users.pm is not in @INC ... if that is not the case, then its eclipse bug.
        I guess you're right. Result/Users.pm is not in @INC before I run the app. Even though my IDE complains it, the app is working well.