Will I cause myself any problems using:
bless {}, __PACKAGE__;
instead of:
my $class = shift;
bless {}, $class;
I realise that __PACKAGE__ limits what I can bless whereas with $class = shift it is a bit more flexible, but apart from that it should work right?
Well I know it works because I'm using it, but it's not going to cause me any grief in the future is it?
bless {}, __PACKAGE__;
instead of:
my $class = shift;
bless {}, $class;
I realise that __PACKAGE__ limits what I can bless whereas with $class = shift it is a bit more flexible, but apart from that it should work right?
Well I know it works because I'm using it, but it's not going to cause me any grief in the future is it?