in reply to Re^2: Is there an official regex for checking module names? (updated)
in thread Is there an official regex for checking module names?

At least on Linux, for existing modules it works as if just one pair of colons was specified:
main::(-e:1): 1 DB<1> use Time::::Piece;

But it loads the package that's declared in the file under its correct name:

DB<2> x Time::::Piece::localtime->ymd; Can't locate object method "ymd" via package "Time::::Piece::localtime +" (perhaps you forgot to load "Time::::Piece::localtime"?) at (eval 7 +)[/usr/lib/perl5/5.26.1/perl5db.pl:738] line 2. DB<3> x Time::Piece::localtime->ymd; 0 '2022-02-09'

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^4: Is there an official regex for checking module names?
by LanX (Saint) on Feb 08, 2022 at 23:29 UTC
    Our brains are in sync again, see my update for win... ;-)

    I'm wondering if there is an OS-agnostic rule to reduce // to /

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      Not leading ones for Windows. If you include the path portions of URLs, then it might not be safe there either.