Mac::NSGetExecutablePath - Perl interface to the _NSGetExecutablePath darwin (OS X) system call.
Version 0.01
sub get_perl_path { if ($^O eq 'darwin') { require Cwd; require Mac::NSGetExecutablePath; return Cwd::abs_path(Mac::NSGetExecutablePath::NSGetExecutablePath()); } else { return $^X; } }
This module provides a Perl interface to the _NSGetExecutablePath darwin system call. It will only build on darwin systems.
_NSGetExecutablePath
Note that if you are using perl 5.16 or greater, then the value of $^X is already computed from the return value of _NSGetExecutablePath, making this module mostly irrelevant.
$^X
NSGetExecutablePath
my $path = NSGetExecutablePath();
Returns a string representing the path to the current executable. This path may rightfully point to a symlink.
This function may throw exceptions, see "DIAGNOSTICS" for details.
NSGetExecutablePath() wants to return a path too large
This exception is thrown when _NSGetExecutablePath requires an outrageously large buffer to return the path to the current executable.
The function "NSGetExecutablePath" is only exported on request, either individually or by the tags ':funcs' and ':all'.
':funcs'
':all'
perl 5.6.
A C compiler. This module may happen to build with a C++ compiler as well, but don't rely on it, as no guarantee is made in this regard.
Exporter (core since perl 5), XSLoader (since 5.006), base (since 5.004_05).
dyld(3).
dyld(3)
Vincent Pit, <perl at profvince.com>, http://www.profvince.com.
<perl at profvince.com>
You can contact me by mail or on irc.perl.org (vincent).
irc.perl.org
Please report any bugs or feature requests to bug-mac-nsgetexecutablepath at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Mac-NSGetExecutablePath. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-mac-nsgetexecutablepath at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Mac::NSGetExecutablePath
Copyright 2012 Vincent Pit, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Mac::NSGetExecutablePath, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mac::NSGetExecutablePath
CPAN shell
perl -MCPAN -e shell install Mac::NSGetExecutablePath
For more information on module installation, please visit the detailed CPAN module installation guide.