Docendo discimus

$self->explain

  • Calendar

    April 2009
    M T W T F S S
    « Nov   Jun »
     12345
    6789101112
    13141516171819
    20212223242526
    27282930  
  • Archives

  • Recent Posts

  • Bling

Try the simplest way first

Posted by brunorc on April 26, 2009

After upgrading Catalyst to the latest (Moosified!) version, I’ve stumbled upon this error:

$ script/myapp_server.pl
can't locate exported subroutine in_global_destruction via Devel::GlobalDestruction at /Users/bruno/local/lib/perl5/site_perl/5.11.0/darwin-2level/Class/MOP.pm line 12
BEGIN failed--compilation aborted at /Users/bruno/local/lib/perl5/site_perl/5.11.0/darwin-2level/Class/MOP.pm line 12.
Compilation failed in require at /Users/bruno/local/lib/perl5/site_perl/5.11.0/Moose/Exporter.pm line 10.
BEGIN failed--compilation aborted at /Users/bruno/local/lib/perl5/site_perl/5.11.0/Moose/Exporter.pm line 10.
Compilation failed in require at /Users/bruno/local/lib/perl5/site_perl/5.11.0/Moose.pm line 16.
BEGIN failed--compilation aborted at /Users/bruno/local/lib/perl5/site_perl/5.11.0/Moose.pm line 16.
Compilation failed in require at /Users/bruno/local/lib/perl5/site_perl/5.11.0/Catalyst/Engine/HTTP.pm line 3.
BEGIN failed--compilation aborted at /Users/bruno/local/lib/perl5/site_perl/5.11.0/Catalyst/Engine/HTTP.pm line 3.
Compilation failed in require at script/myapp_server.pl line 6.
BEGIN failed--compilation aborted at script/myapp_server.pl line 7.

I looked into the code. I googled. I asked on IRC. All I got was an advice to check this:

$ perl -MDevel::GlobalDestruction=in_global_destruction -e1

This worked, so… WTF? When everything failed, I tried this:

$ ~/local/bin/catalyst.pl -force -scripts myapp

Of course, it solved my problem. So I’m one lesson wiser (I hope…).

Advertisements

2 Responses to “Try the simplest way first”

  1. garu said

    Indeed. Just so you know, your post inspired to add the “Update Application Scripts” option on the Catalyst Plugin for Padre, so it’s even easier, specially for newcomers working with the Padre IDE

    Good job!

    • brunorc said

      Thanks! I just followed the mst idea: “even if you did something stupid, write about it, so others will be able to avoid repeating the same thing”.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: