Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??
Hello Monks,
I'm trying to understand how PAR works.
First of all, I'm expecting it creates an executable file, with all dependencies resolved, but it seems it isn't so.
So I tried to do a simple code, like this one, just to test how PAR works:
use strict; use warnings; use Switch; my $mode='network'; print "\n\n"; switch ($mode) { case ('alternative') { print 'alternative'; } case 'network' { print 'network'; } else { # local value or not specified print 'default'; } } print "\n\n";
And I'm trying to have an executable file, with all dependencies ("use switch") solved. I'm tring:
pp -o hello.exe hello.pl
But the switch is not in the executable libraries.
En fact I have:
Can't locate deprecate.pm in @INC (@INC contains: CODE(0x140 lf\IMPOST~1\Temp\par-wolf\cache-a6a07c4c8edef3f3831fbe053938 C:\DOCUME~1\wolf\IMPOST~1\Temp\par-wolf\cache-a6a07c4c8edef af3a550\inc CODE(0x124b304) CODE(0x124b604)) at if.pm line 1 BEGIN failed--compilation aborted at Switch.pm line 7. Compilation failed in require at script/ciao.pl line 3. BEGIN failed--compilation aborted at script/ciao.pl line 3.
I have also read the documentation and tried -B option, but without result.

How can I build an executable file with deprecate.pm (or switch.pm) builded in it?
Thank you

In reply to How PAR pp works? by saintex

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.