Re: Re: [Mason] Unquoted component names give bareword errors
Jonathan Swartz <[email protected]>
| Newsgroups | gmane.comp.web.mason.devel,gmane.comp.web.mason.user |
|---|---|
| Message-ID | <[email protected]> |
> [cc'ed to mason-devel; followups should probably go there.]
>
> On Fri, Oct 08, 2004 at 11:07:08PM -0400, Rick Delaney wrote:
>
>>I have a component call like
>>
>> <&
>> /lib/news.mc:list,
>> some=>$args,
>> &>
>>
>>which in version 1.25 is appears on the object file as
>>
>> $m->comp( '/t7e/lib/news.mc:list',
>> some=>$args, );
>>
>>and works fine. In version 1.26 the object file looks like
>>
>>$m->comp(
>> /lib/news.mc:list,
>> some=>$args,
>> );
>>
>>which, while prettier, has no quotes around the component call and is
>>leading to "Bareword found where operator expected" errors. Is there
>>something I can do about this besides switching versions?
>>
>>FYI, I'm using Debian packages, libhtml-mason-perl 1.25-1 and 1.26-1.
>
>
> I think I've tracked this down to line 488 in Mason/Compiler.pm:
>
> for ($call) { s/^ +//; s/ +$//; }
>
> which used to be
>
> for ($call) { s/^\s+//; s/\s+$//; }
>
> so I suppose I could change my calls to
>
> <& /lib/news.mc:list,
> some=>$args,
> &>
>
> but that's irritating. Why the change?
This is definitely a bug, and we need a test for it. My guess is that
the change had to do with supporting comments within <& &>.
Jon
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl