Hello,

I'm reading http://willert.livejournal.com/2008/09/09/ and http://bricas.vox.com/library/post/catalyst-exceptionclass.html

In the first I don't understand how $subclass can have a Fields method (or accessor).

  for my $field ( grep{ exists $def->{$_} } $subclass->Fields ) {

I've tried to use it and I got following error:

Can't locate object method "Fields" via package "AccessDenied" at (eva +l 25)[/usr/pkg/lib/perl5/site_perl/5.10.0/Exception/Class.pm:170] lin +e 15. at (eval 25)[/usr/pkg/lib/perl5/site_perl/5.10.0/Exception/Class.pm:1 +70] line 15 AccessDenied::Fields('AccessDenied') called at /home/fer/arancia/s +cript/../lib/Exception/Class/WithDefaults.pm line 40 Exception::Class::WithDefaults::_make_subclass('Exception::Class:: +WithDefaults', 'subclass', 'AccessDenied', 'def', 'HASH(0x28874dc0)') + called at /usr/pkg/lib/perl5/site_perl/5.10.0/Exception/Class.pm lin +e 55 Exception::Class::import('Exception::Class::WithDefaults', 'Conten +tNotFound', 'HASH(0x28874d10)', 'AccessDenied', 'HASH(0x28874dc0)', ' +ProjectNotFound', 'HASH(0x28874cd0)', 'RevisionNotFound', 'HASH(0x288 +74d50)', ...) called at /home/fer/arancia/script/../lib/arancia/Excep +tions.pm line 45 arancia::Exceptions::BEGIN() called at /usr/pkg/lib/perl5/site_per +l/5.10.0/Sub/Exporter.pm line 47 eval {...} called at /usr/pkg/lib/perl5/site_perl/5.10.0/Sub/Expor +ter.pm line 47 require arancia/Exceptions.pm called at /home/fer/arancia/script/. +./lib/arancia.pm line 7 arancia::BEGIN() called at /usr/pkg/lib/perl5/site_perl/5.10.0/Sub +/Exporter.pm line 47 eval {...} called at /usr/pkg/lib/perl5/site_perl/5.10.0/Sub/Expor +ter.pm line 47 require arancia.pm called at /home/fer/arancia/script/arancia_fast +cgi.pl line 11 main::BEGIN() called at /usr/pkg/lib/perl5/site_perl/5.10.0/Sub/Ex +porter.pm line 47 eval {...} called at /usr/pkg/lib/perl5/site_perl/5.10.0/Sub/Expor +ter.pm line 47

In reply to Catalyst and Excepetion::Class by ferz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.