seven_shen has asked for the wisdom of the Perl Monks concerning the following question:

I meet a strange problem, i install firefox 3.6(32bit )on WIN7 64bit system, and install Mozrepl plugin. Here is my codes:

use WWW::Mechanize;

use WWW::Mechanize::Firefox;

use Firefox::Application;

print "before open\n";

my $mech =WWW::Mechanize::Firefox->new(launch=>"C:\\Program

Files\\Mozilla Firefox 3.6\\firefox.exe");

print "after open\n";

While, Firefox can be open, but perl informs following error:

Failed to connect to, Can't call method "process" on an undefined value at C:/Perl64/site/lib/MozRepl/Plugin/Base.pm line 173

This code runs successfully on 32bit XP. What could be the cause?

  • Comment on firefox application on 64bit os problem

Replies are listed 'Best First'.
Re: firefox application on 64bit os problem
by marto (Cardinal) on Apr 14, 2011 at 14:47 UTC
Re: firefox application on 64bit os problem
by BrowserUk (Patriarch) on Apr 14, 2011 at 15:13 UTC
    Failed to connect to, Can't call method "process" on an undefined value at C:/Perl64/site/lib/MozRepl/Plugin/Base.pm line 173

    The line in question is:

    $self->template->process($name, $vars, \$output);

    Which strongly suggests that the template method is returning undef. For the why of that you would need to dig deeper into the code to work out where and why.

    Your mention of it working on 32-bit XP and not on 64-bit Win7, combined with attempting to manipulate a 32-bit application from a 64-bit Perl rings alarm bells in my head. 64-bit processes cannot utilise 32-bit dlls nor vice versa. I cannot see anything to suggest that is the root of the problem here, but I've only looked just under the surface. You will need to track into this much further.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      WWW::Mechanize::Firefox talks to Firefox using TCP, so there is no problem on that corner. Still it seems very weird to me that the template processing should fail, as all the templates are contained within their respective MozRepl::Plugin modules.

        Given your authorship, I defer to your expertise. (But if there is any other explanation for that error message, I'd love to know it?:)


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        I solved the issue finally. The root cause is I use perl-32bit in WIN7-64 platform. The Template::Toolkit module installed in perl 32bit does not support well in WIN7 64bit platform. Thus this $self->template will not get object correctly. After I install perl-64bit and install Template::Toolkit via 64bit-PERL PPM, this issues disappears. So what is the difference between perl 32 and perl 64? Seems most modules installed in 32bit-perl works fine in 64bit OS, but this one is an exception!