Subject: | chaining methods (i.e. ->new($v)->method) behaves inconsistently |
chaining some methods work okay:
$ perl -Mstrict -Mwarnings -MPerl::Version -e 'print
Perl::Version->new("1.03")->numify, "\n"'
1.003
others do not:
$ perl -Mstrict -Mwarnings -MPerl::Version -e 'print
Perl::Version->new("1.03")->inc_version, "\n"'
Use of uninitialized value in print at -e line 1.
$ perl -Mstrict -Mwarnings -MPerl::Version -e 'my
$v=Perl::Version->new("1.03"); $v->inc_version;print $v, "\n"'
1.04