# Doggie.pm package Doggie; 1; sub new { # ignore args print "hello from Doggie::new\n"; } #### use strict; use warnings; use Doggie; sub Doggie { print "hello from main::Doggie\n"; } my $objref1 = Doggie::->new(Tail => 'short', Ears => 'long'); my $objref2 = new Doggie:: Tail => 'short', Ears => 'long'; # The following is parsed as Doggie()->new(...) # my $objref3 = Doggie->new(Tail => 'short', Ears => 'long'); __END__ #### hello from Doggie::new hello from Doggie::new