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?