Subject: | WritingPlugins and Catalyst::Request |
Hi there,
In WritingPlugins (first code block in section EXAMPLE) it gives an
example of inserting a 'uuid' accessor into the Catalyst::Request namespace.
I found that jumping package scope into Catalyst:Request like that,
using a block and the package keyword, confused the PAUSE indexer when I
uploaded my plugin (it thought I wanted to do things in the
Catalyst::Request namespace, and whinged about permissions).
To hack around this, try instead:
use Symbol;
*{Symbol::qualify_to_ref('uuid', 'Catalyst::Request')} =
Class::Accessor::make_accessor('Catalyst::Request', 'uuid');
Note that Symbol.pm is Perl core now, so it should work fine and insert
the accessor just as in the POD's example, but without confusing PAUSE.
HTH! Sorry for putting it in AnnoCPAN first. At the last YAPC someone
mentioned that AnnoCPAN might be generating rt.cpan.org tickets
automatically from postings, but I guess my brain merged fantasy and
reality :)
regards,
oliver.