Hi, I've got a strange problem using pp to compile a Perl script to exe. If I use a small script it works no problem but my script is hanging at the first "Set up gcc environment - 3.4.5 (mingw-vista special r3)" message.

I'm running ActivePerl 5.14..3 Build 1404 and I've just installed PAR::Packer today.

My script looks like this,

#!/usr/bin/perl -w my $color; my $summary; my $statusmsg; use Data::Dumper; use strict; use warnings; use DateTime; use Win32::OLE; my $dt = DateTime->now; # Stores current date and time as datetime + object my $date = $dt->dmy; # Retrieves date as a string in 'dd-mm-yyyy' fo +rmat my $time = $dt->hms; # Retrieves time as a string in 'hh:mm:ss' form +at my $datetime = "$date $time"; # creates 'yyyy-mm-dd hh:mm:ss' string my $computer = "localhost"; my $WMI = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") + or die; my $diskQ = $WMI->ExecQuery("SELECT CurrentDiskQueueLength FROM Win32_ +PerfFormattedData_PerfDisk_LogicalDisk where Name = C:"); if ($diskQ > 10) { $color = "red"; $summary = "$datetime Current Disk Queue length for drive C: $ +diskQ"; $statusmsg = "&red Current Disk Queue length for Drive C: is > + 10\n\n"; } else { $color = "green"; $summary = "$datetime Current Disk Queue length for drive C: $ +diskQ"; $statusmsg = "&red Current Disk Queue length for Drive C: is < + 10\n\n"; } open (MYFILE, 'C:\Program Files\BBWin\tmp\diskQ.txt'); print MYFILE $color; print MYFILE $summary; print MYFILE $statusmsg; close (MYFILE);

I've syntax checked it with Perl -c and with Enginsite Perl Editor so I know I have all the modules installed so has anyone any ideas about why it might be hanging?


In reply to Issue with pp compile by fazedandconfused

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.