Karen Etheridge via RT wrote:
Show quoted text>I'm not sure I follow this. Are you saying that if a program is provided
>a package name with a ' in it, it should do the translation to :: first
>before passing it to (e.g.) use_module() or require_module()?
That's an implication of not changing the module, but not what I was
saying in the bit you quoted. What I was saying there is that a '
separator in actual Perl code gets translated to :: by the parser.
For example:
$ perl -lwe "print for Foo'Bar"
Foo::Bar
So the ' separator is more confined to the parser; the :: separator is
the one that actually appears in runtime data structures.
Show quoted text>It appears that package names containing ' are stored in the symbol
>table that way:
That's interesting. The ' is not actually in the stash data structures
at all: the %main:: stash contains a "Foo::" entry, and so on. But '
separators are being accepted in the symbolic reference string; they're
handled by parse_gv_stash_name() in the core. I didn't know it did that.
Show quoted text>I didn't see any documentation stating that ' separators were not
>respected. Which incompatibility do you mean?
The section of Module::Runtime(1) titled "Module name syntax".
Show quoted text>I didn't see any other code here that performs a package-to-file
>translation
The module name syntax is used in other ways. The function
is_module_name() checks a string for the documented syntax, and there
are public regexps doing the same thing. There are also the module name
composition functions around compose_module_name(), which operate on a
documented variant of the module name syntax.
Show quoted text>it would have been preferred to point out what was missing than just
>saying that something was missed
I wasn't intending for you to make a more extensive patch, and I
still wouldn't accept one. But actually I interpreted your request as
*intentionally* only affecting the one function.
-zefram