[Chicago-talk] Shortening a module name

Steven Lembark lembark at wrkhors.com
Mon Feb 27 10:05:55 PST 2006


> Maybe you meant:
> 
> sub contract {
>     return "Finance::InteractiveBrokers::TWS::com::ib::client::Contract";
> }
> 
> and then later
> 
> $tws->contract->new();
> 
> which works, I didn't know you could do it like that

What about just using a variable to store the class in 
a variable?

    my $class =
'Some::Very::Long::Pacakge::Class::You::Want::To::Use::Here';

    my $obj = $class->constructor( @argz );




-- 
Steven Lembark                                       85-09 90th Street
Workhorse Computing                                Woodhaven, NY 11421
lembark at wrkhors.com                                     1 888 359 3508


More information about the Chicago-talk mailing list