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?
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|