]> git.vpit.fr Git - perl/modules/Mac-NSGetExecutablePath.git/blob - README
Update VPIT::TestHelpers to 15e8aee3
[perl/modules/Mac-NSGetExecutablePath.git] / README
1 NAME
2     Mac::NSGetExecutablePath - Perl interface to the _NSGetExecutablePath
3     darwin (OS X) system call.
4
5 VERSION
6     Version 0.03
7
8 SYNOPSIS
9         sub get_perl_path {
10          if ($^O eq 'darwin') {
11           require Cwd;
12           require Mac::NSGetExecutablePath;
13           return Cwd::abs_path(Mac::NSGetExecutablePath::NSGetExecutablePath());
14          } else {
15           return $^X;
16          }
17         }
18
19 DESCRIPTION
20     This module provides a Perl interface to the "_NSGetExecutablePath"
21     darwin system call. It will only build on darwin systems.
22
23     Note that if you are using perl 5.16 or greater, then the value of $^X
24     is already computed from the return value of "_NSGetExecutablePath",
25     making this module mostly irrelevant.
26
27 FUNCTIONS
28   "NSGetExecutablePath"
29         my $path = NSGetExecutablePath();
30
31     Returns a string representing the path to the current executable. This
32     path may rightfully point to a symlink.
33
34     This function may throw exceptions, see "DIAGNOSTICS" for details.
35
36 DIAGNOSTICS
37   "NSGetExecutablePath() wants to return a path too large"
38     This exception is thrown when "_NSGetExecutablePath" requires an
39     outrageously large buffer to return the path to the current executable.
40
41 EXPORT
42     The function "NSGetExecutablePath" is only exported on request, either
43     individually or by the tags ':funcs' and ':all'.
44
45 DEPENDENCIES
46     perl 5.6.
47
48     A C compiler. This module may happen to build with a C++ compiler as
49     well, but don't rely on it, as no guarantee is made in this regard.
50
51     Exporter (core since perl 5), XSLoader (since 5.6.0), base (since
52     5.004_05).
53
54 SEE ALSO
55     dyld(3).
56
57 AUTHOR
58     Vincent Pit, "<perl at profvince.com>", <http://www.profvince.com>.
59
60     You can contact me by mail or on "irc.perl.org" (vincent).
61
62 BUGS
63     Please report any bugs or feature requests to
64     "bug-mac-nsgetexecutablepath at rt.cpan.org", or through the web
65     interface at
66     <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Mac-NSGetExecutablePath>
67     . I will be notified, and then you'll automatically be notified of
68     progress on your bug as I make changes.
69
70 SUPPORT
71     You can find documentation for this module with the perldoc command.
72
73         perldoc Mac::NSGetExecutablePath
74
75 ACKNOWLEDGEMENTS
76     The implementation of this module is inspired by Nicholas Clark's work
77     of adding this feature to perl 5.16.
78
79 COPYRIGHT & LICENSE
80     Copyright 2012,2013 Vincent Pit, all rights reserved.
81
82     This program is free software; you can redistribute it and/or modify it
83     under the same terms as Perl itself.
84