use aliased 'Rose::HTML::Form::Field::DateTime' => 'DateField'; my $dt = DateField->new(...);
When you leave out the second argument, your alias is 'DateTime' (which would be a bad idea, because this clashes with the CPAN module DateTime).
If you have a complex class structure under a common name space, have a look at aliased::factory.
Links:
Quite a while ago, I also got tired of Typing::Long::Package::Names and started aliasing, though I picked Package::Alias (didn't remember why I picked it over namespace::alias or aliased back then).
ReplyDelete