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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |