Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^3: Enbugger on Windows ($^X)

by tye (Sage)
on Jan 21, 2012 at 02:08 UTC ( #949095=note: print w/ replies, xml ) Need Help??

in reply to Re^2: Enbugger on Windows (add your own -d)
in thread Enbugger on Windows

Sad that perl2exe breaks $^X. They probably consider this a "feature". You could try asking the OS more directly:

use Win32::API (); sub GetPerlExePath { my $f= 'GetModuleFileName'; my $m= Win32::API->new( 'kernel32', $f, 'III', 'I' ) or die "Can't find $f() in kernel32.dll: $^E\n"; my $l= 512; my $s= ' ' x $l; my $a= unpack "I", pack "P", $s; my $r= $m->Call( 0, $a, $l ); die "$f failed: $^E\n" if ! $r; $s= substr( $s, 0, $r ); return $s; }

- tye        

Comment on Re^3: Enbugger on Windows ($^X)
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://949095]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-11-26 05:47 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (696 votes), past polls