You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
universal.c - handle version style imports as a version check
if someone does
use Thing 1.234;
it is interpreted as
BEGIN {
require Thing;
Thing->import();
Thing->VERSION(1.234);
}
however in the case of
use Thing "1.234";
we treat it as
BEGIN {
require Thing;
Thing->import("1.234");
}
however if people use Exporter::import() as their
importer then its import will turn such cases silently into
Thing->VERSION("1.234")
anyway.
With the new logic to detect if someone has called into
UNIVERSAL::import() with an argument we were not discriminating between
the two cases.
This patch basically does the same thing that Exporter would.
This patch also special cases the class Test::SubExport::SETUPALT
so that Sub::Exporter does not break, as it is very high in the CPAN
river, and when it is broken we have problems with test reporting.
0 commit comments