MOJO!!!!

mojo1.jpg

Well it seems somehow I always have great luck (not sure if it is good or bad) when getting a new computer and then loading Mojolicious on it.

So twice before this has happened to me, I set it up with all my dev software, a few flavors of perl, Padre and so on. Then I add start to port over some of my web apps then I try to run them and sure enough Mojolicous gives me great grief.

It seems I have an uncanny knack to update or break in a new box just as a new n.0 version of Mojolicious comes out (this time it is 6.0, I might of actually been one of the first to download it). Well at least I am savvy enough not to update the Mojo on my production boxes as quickly, so there is no real loss money wise just some frustration.

This time out I did not get as many as my last round (3.xx ~5.0) but here is some quick items to look at before you update your Mojo.

  1. EV does not work with ithreads
  2. Well I am a windows kind of guy (yeah I can see your eys rolling to the back of your head) so when I tried to start my first app up with a simple
     
    >morbo aDnD
    
    I got the above error

    Well a few mins on google led me right here Mojo FAQ and a simple addition of MOJO_REACTOR to the ENV vars solved my problems so I guess morbo is more and more like production server so that is good to see


  3. Removed deprecated object-oriented Mojo::Loader API

  4. Well it seems I haven't been reading the what is being deprecated and this one caught me big time in a number of my apps so it took a little while to fix them all. Mostly changing from this

     
    Mojo::Loader->load('CS::Base::aDnD'); 
    

    to something like this

     
    Mojo::Loader::load_class('CS::Base::DA');

  5. Removed deprecated bridge method from Mojolicious::Routes::Route

  6. Well this one was a big of a bugger for me anyway though it was easy enough to fix

     
     my $rn = $r->bridge->to('authn#check');
    
    to
     
     my $rn = $r->under->to('authn#check');
    

    but I will have to go out someday soon and make a bunch of updates to the documentation of authorization plugin or at least check that I do not use bridge anywhere.

  7. Replaced reserved stash value partial with render_to_string method
  8. This one took me a while to figure out as it first showed up in a silly little helper in my base class, not sure if the 'partial' still works elsewhere I think it must as I use it all over the place. The fix was simple enough and even a little more readable.

    
    my $html = $self->render( $string, partial => 1, );
    

    becomes

    
      my $html = $self->render_to_string( $string );
    


Well all in all things did not take too much time to fix up perhapse 30~60 mins per app.

I am not complaining about it it is just what one has expect and to deal with when playing with Mojo.

Next time I will know better to keep an eye on when the next '.0' release is coming and see what is deprecated and what has been removed

Leave a comment

About byterock

user-pic Long time Perl guy, a few CPAN mods allot of work on DBD::Oracle and a few YAPC presentations