develooper Front page | perl.perl5.porters | Postings from October 2006

Re: FW: Attribute::Handlers

Thread Previous
From:
Rafael Garcia-Suarez
Date:
October 26, 2006 01:39
Subject:
Re: FW: Attribute::Handlers
Message ID:
b77c1dce0610260139k489dcab2sefd76bbdf6c313d0@mail.gmail.com
On 25/10/06, David Feldman <David.Feldman@tudor.com> wrote:
> At Artur Bergman's suggestion, I am contacting you.  Here is my original
> message to Artur:
>
>         Artur,
>
>         I am using your Attribute::Handlers module, but I needed to make
> a modification to it to enable better diagnostics.  Basically, I have
> the  [meta-]handler store the filename and line number of the attribute
> invocation, and then the handler is passed these as parameters.  So, my
> handlers now have a call spec of:
>
>                 sub Args : ATTR(CODE) {
>                     my($package, $symbol, $referent, $attr, $data,
> $phase, $filename, $linenum) = @_;
>                 }
>
>         That way, if there is an error in attribute processing (for
> example, if the 'Args' attribute is applied twice to the same function),
> then my error messages can print the filename and line number.
>
>         If you'd like, I'll share the code modifications with you.  They
> are trivial and took about 5 minutes to work into your code.

I would welcome such a patch, it looks useful.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About