I have a test file that goes somewhat like this:
#!/usr/bin/perl -w
use strict;
use FindBin;
use lib "$FindBin::Bin/../lib";
use lib "$FindBin::Bin/../Myapp/lib/";
#use Test::MockObject;
use Test::WWW::Mechanize::Catalyst;
use Test::More tests=>12;
use DateTime;
use DateTime::Duration;
my $mech = Test::WWW::Mechanize::Catalyst->new(catalyst_app => 'Myapp'
+);
# more tests make no difference
If the use Test::MockObject is commented out, everything works,
and the test passes.
But if the line is NOT commented out, I get
Deep recursion on subroutine "HTML::FormFu::base::render" at /usr/shar
+e/perl5/HTML/FormFu/Element.pm line 34.
Deep recursion on subroutine "UNIVERSAL::can::can" at /usr/share/perl5
+/UNIVERSAL/isa.pm line 60.
Deep recursion on subroutine "UNIVERSAL::isa" at /usr/share/perl5/UNIV
+ERSAL/can.pm line 43.
Deep recursion on subroutine "UNIVERSAL::can::can" at /usr/share/perl5
+/HTML/FormFu/Element/_Field.pm line 158.
Deep recursion on subroutine "UNIVERSAL::isa" at /usr/share/perl5/UNIV
+ERSAL/can.pm line 43.
Deep recursion on subroutine "HTML::FormFu::Element::Block::string" at
+ /usr/share/perl5/HTML/FormFu/base.pm line 15.
Deep recursion on subroutine "HTML::FormFu::Element::_Input::string" a
+t /usr/share/perl5/HTML/FormFu/base.pm line 15.
Deep recursion on subroutine "HTML::FormFu::Element::render_data" at /
+usr/share/perl5/HTML/FormFu/Element/_Input.pm line 39.
Deep recursion on subroutine "HTML::FormFu::Element::_Input::render_da
+ta_non_recursive" at /usr/share/perl5/HTML/FormFu/Element.pm line 190
+.
Deep recursion on subroutine "HTML::FormFu::Element::_Field::render_da
+ta_non_recursive" at /usr/lib/perl/5.10/mro.pm line 28.
Deep recursion on subroutine "HTML::FormFu::Element::_Field::nested_na
+me" at /usr/share/perl5/HTML/FormFu/Element/_Field.pm line 606.
Deep recursion on subroutine "HTML::FormFu::Element::_Field::nested_na
+mes" at /usr/share/perl5/HTML/FormFu/Element/_Field.pm line 130.
Deep recursion on anonymous subroutine at /usr/share/perl5/UNIVERSAL/i
+sa.pm line 35.
If I edit the controller and replace use base 'Catalyst::Controller::HTML::FormFu'; with use parent 'Catalyst::Controller'; then the Test::WWW::Mechanize::Catalyst object is allocated correctly, but, of course, nothing relying on FormFu works anymore.
Anybody ran into this before? Any ideas what this could be? Any ideas for work-arounds?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Outside of code tags, you may need to use entities for some characters:
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|