Damian Conway wrote:
>> When using the code block alias, are the outermost curly braces
>> considered to be part of the ambient code?
>
> Yes. All ambient code is actual code.

OK.  Let me propose an alternative (which I expect will be immediately
shot down):

Allow '=begin alias', '=end alias', and '=for alias' as special cases:
the Perl parser makes an exception for them and doesn't treat them as
the start or end of POD Blocks, merely as single-line directives; but
the Pod parser treats them as normal Pod Blocks, with the contents
being attached to the alias.  Net result: said contents count both as
ambient code and as aliased text.  Benefits: you can alias any ambient
code that you want, as long as it consists of one or more full lines;
and your method for delimiting the alias is one that Pod writers will
be quite use to.  Drawback: the Perl parser will need to look forward
a bit further before deciding how much "ambient commentary" there is.

-- 
Jonathan "Dataweaver" Lang

Reply via email to