You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Michael Smith <sm...@gmail.com> on 2007/06/20 16:19:28 UTC
Small change request
>From the documentation:
--
In Embperl 2.0.2 and up you can use a shortcut syntax for passing parameters:
[$ sub foo ($p) $]
<p> Here we show the first parameter [+ $p +]</p>
[$ endsub $]
--
This works nicely but [$ sub foo($p) $] (ie without the space between
foo and ($p)) gives an error.
Might be worth allowing this in some future version if it's not too hard?
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: Small change request
Posted by Gerald Richter - ECOS GmbH <ri...@ecos.de>.
>
> This works nicely but [$ sub foo($p) $] (ie without the space
> between foo and ($p)) gives an error.
>
> Might be worth allowing this in some future version if it's
> not too hard?
>
The regex that splits out the arguments is in
Embperl/Syntax/EmbperlBlocks.pm line 420. Should be easily to change to
work without spaces. Patches are welcome :-)
Gerald
** Virus checked by BB-5000 Mailfilter **
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org