-
Notifications
You must be signed in to change notification settings - Fork 601
Closed
Description
use Foobar.12345; compiles without error and calls Foobar->import("Foobar",0.12345);
I could not find any documentation of this odd behavior.
Is this old parser support for legacy version checking via the Exporter module (which calls $modname->VERSION($arg) for numeric args)? This only works for version numbers < 1.0 so maybe not.
But clearly Perl is parsing this specially.
If this is intentional then the special parsing should be documented in perlfunc ('use'). If not intentional then a parse error might be appropriate.
Steps to Reproduce
echo 'package XX;use Data::Dumper; sub import{ for(@_){print Dumper($_);} } 1;' >/tmp/XX.pm
perl -I/tmp -E 'use XX.12345;'
Result
$VAR1 = 'XX';
$VAR1 = '0.1234';
Expected result
Naively I would assume Perl would search for "XX.12345.pm" in @INC and fail if not found, or possibly complain that "XX.12345" is not a valid module name.
(Perl v5.41.4)
Metadata
Metadata
Assignees
Labels
No labels