As it says in Changes 2.14:
** Incompatible changes
- Deprecate %%-lines, <%args> section and <%shared> section, which IMO add
unnecessary TMTOWTDI. Standardize on the <%class> section and Moose 'has'
declarations. These alternate syntaxes may make it into a plugin.
So %% is deprecated and will probably disappear at some point, though it could
easily be put into a plugin.
On Jan 23, 2013, at 4:21 AM, Allan Engelhardt <all...@cybaea.com> wrote:
>
>
> On 22 January 2013 14:48, Pedro Melo <m...@simplicidade.org> wrote:
> Hi,
>
> On Tue, Jan 22, 2013 at 12:35 PM, Allan Engelhardt <all...@cybaea.com> wrote:
> For Mason 2, Mason::Compilation implements %% lines which do not appear to be
> documented in Mason::Manual::Syntax. They whack the rest of the line into the
> class header (_add_to_class_block) as opposed to the current method. Is it
> “safe” to use these lines, for a definition of safe that roughly means ‘this
> functionality is unlikely to go away in the future’ or should I just code my
> components properly and stop hacking around?
>
> I'm really not sure… I never used that, and didn't noticed that it was
> possible.
>
> As I said: not really documented. I was working on a way to disable the
> processing of '%' lines when I first came across it.
>
> what's the benefit over placing your code inside <%class></%class>?
>
> Only for hacks. The class section is The Right Place for it. But I have some
> code that I haven't yet figured out how to factor out so for the moment I am
> doing the old cut-and-paste. For that it is convenient to have everything in
> one section and not having to paste some into class and other into the main
> component sections.
>
> (But then I am also modifying $$_m_buffer directly from the component so what
> do you expect…? :) )
>
> Allan
>
>
> Bye,
> --
> Pedro Melo
> @pedromelo
> http://www.simplicidade.org/
> http://about.me/melo
> xmpp:m...@simplicidade.org
> mailto:m...@simplicidade.org
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d_______________________________________________
> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users