Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b828871 commit 36ee13cCopy full SHA for 36ee13c
1 file changed
docsource/builddocs.pl
@@ -6,13 +6,21 @@
6
use Markdent::Simple::Fragment;
7
use File::Map qw(map_file);
8
use File::Path qw(make_path);
9
+use Cwd 'abs_path';
10
11
use constant false => 0;
12
use constant true => 1;
13
14
main();
15
16
sub main{
17
+ # change current working directory to location of script.
18
+ # this keeps realative paths later in script easier to maintain.
19
+ # Source: https://sysengineers.wordpress.com/2009/12/04/changing-working-directory-to-script-location-in-perl/
20
+ my $path = abs_path($0);
21
+ $path =~ s/builddocs.pl//gi;
22
+ chdir ($path);
23
+
24
# Create output directories if the don't exists
25
make_path("../docs");
26
0 commit comments