Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Building a Mojolicious app with PAR::Packer

by Hue-Bond (Priest)
on Feb 25, 2011 at 16:31 UTC ( #890188=note: print w/replies, xml ) Need Help??


in reply to Re: Building a Mojolicious app with PAR::Packer
in thread Building a Mojolicious app with PAR::Packer

All of -n -x, -x and -c do the trick and take me to the Mojo/Home.pm line 25 error. I hadn't noticed that the error was precisely in that file: as soon as you pointed it out I remembered that the test t/mojo/home.t had failed before the (forced) installation. Thankfully, Google has something to say about it so I'll now concentrate on that.

Thank you!

--
 David Serrano
 (Please treat my english text just like Perl code, i.e. feel free to notify me of any syntax, grammar, style and/or spelling errors. Thank you!).

Replies are listed 'Best First'.
Re^3: Building a Mojolicious app with PAR::Packer
by Hue-Bond (Priest) on Feb 26, 2011 at 23:12 UTC

    No line number confusion: abs_path was dying. Turns out that the failing test had nothing to do with it - the problem is caused due to an interference with PAR's runtime environment. Prepending a bit of code to the main script works around the problem:

    use File::Spec; BEGIN { if ($ENV{'PAR_TEMP'}) { my $dir = File::Spec->catfile ($ENV{'PAR_TEMP'}, 'inc'); chdir $dir or die "chdir: '$dir': $!"; } }

    We go to the parent directory of script so now it's properly detected.

    --
     David Serrano
     (Please treat my english text just like Perl code, i.e. feel free to notify me of any syntax, grammar, style and/or spelling errors. Thank you!).

      Hello all. Did you alors experienced this kind of error messages with Mojo ? (Did'nt get rid of even while including or creating by hand the epl files)
      Can't open file "Mojolicious\templates\exception.html.ep": No such fil +e or directory at Mojo/Home.pm line 119. Compilation failed in require at Mojolicious.pm line 6. BEGIN failed--compilation aborted at Mojolicious.pm line 6. Compilation failed in require at Mojo/Base.pm line 32.

      Hello all.

      Did you also experience this kind of error messages with Mojo ? (Did'nt get rid of even while including or creating by hand the epl files)
      Can't open file "Mojolicious\templates\exception.html.ep": No such fil +e or directory at Mojo/Home.pm line 119. Compilation failed in require at Mojolicious.pm line 6. BEGIN failed--compilation aborted at Mojolicious.pm line 6. Compilation failed in require at Mojo/Base.pm line 32.

        One solution with PAR::Packer and pp.

        Add the following option to your compile command line :

        C:\strawberry\perl\bin\perl.exe "C:\strawberry\perl\site\bin\pp.bat" +--output="<your_script>.exe" --log="<your_script>.pp.log" --verbose=3 + --cachedeps="<somewhere_tmp>\ppcache" --info FileVersion="0.0.0.0" - +-info ProductVersion="0.0.0.0" --compress 6 --addfile="C:\strawberry\ +perl\site\lib\Mojolicious;Mojolicious" --bundle --save "<you_script>. +pl"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://890188]
help
Chatterbox?
[Corion]: Meh. I need to find myself a better "programming" feed than r/programming (which is just HackerNews reposts and advertisements, very little code). Maybe I should select a list of links that I liked on r/programming and then google for ...
[Corion]: ... an aggregator site that also listed (ideally) all of these links once. And maybe also have an exclude list to blacklist some of the most spammy links that the site may have never mentioned at all
[marto]: I gave up reading HN at all, and feel much better for it :P
[Corion]: Now, how to best automate that Google search ... :-)
[Corion]: marto: Yeah, I'm also short of not reading it at all. I already stopped reading it in the morning because it gave me a foul mood.
[Corion]: The good posts on HN are the non-computing posts. Most of the other stuff is maybe relevant to you if you are 20 and live in Silicon Valley...
[Corion]: Two attributes that don't describe me.
[Corion]: Maybe I should also write a curator for HN or simply not read it anymore, like you do.

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2017-07-24 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (354 votes). Check out past polls.