Technically, you can create packages and variables with pretty much any name. But let's assume you are referring to the ones you could use without taking special measures. Your pattern has at least four problems:
$ perl -we'package ::' && echo ok ok
$ perl -we'package _a;' && echo ok ok
$ perl -Mutf8 -we'package é;' && echo ok ok
$ perl -we'package aaaa::::::bbbb;' && echo ok ok
The first one is occasionally used. It refers to the root package (for which main is an alias), so %:: is Perl's symbol table, $_ means $::_, etc.
I haven't seen any instances of the second and third, but there's nothing overly special about them.
I wouldn't consider the final one valid (even though it was accepted).
In reply to Re: Is there an official regex for checking module names?
by ikegami
in thread Is there an official regex for checking module names?
by kcott
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |