summaryrefslogtreecommitdiff
path: root/NetWare/splittree.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-09-16 09:03:10 +0100
committerNicholas Clark <nick@ccl4.org>2009-09-16 09:03:10 +0100
commit9139c7231c70a9388d718abc41e91edaf43422ec (patch)
tree251ae5d6f5c3743582884d8cf6847b63e908bdce /NetWare/splittree.pl
parent2096afc47576baa623939e9e084b606dc97f60d8 (diff)
downloadperl-9139c7231c70a9388d718abc41e91edaf43422ec.tar.gz
Revert 109e4020 and 2da760ce for now. Win32 needs to AutoSplit DynaLoader.pm
Khan! Win32 is special. It builds DynaLoader by hand, copies in DynaLoader.pm (and XSLoader.pm) to lib, and *then* runs, and relies on, the general AutoSplit to split them. It would be better if everything standardised on building DynaLoader via its Makefile.PL and MakeMaker. This reverts commit 2da760ceef1d2d90b3141bdeb239c7d7580be05a. This reverts commit 109e4020ef40828991be28fb05d9f269b4d92530.
Diffstat (limited to 'NetWare/splittree.pl')
-rw-r--r--NetWare/splittree.pl24
1 files changed, 24 insertions, 0 deletions
diff --git a/NetWare/splittree.pl b/NetWare/splittree.pl
new file mode 100644
index 0000000000..3c76daadb1
--- /dev/null
+++ b/NetWare/splittree.pl
@@ -0,0 +1,24 @@
+use DirHandle;
+use AutoSplit;
+
+sub splitthis {
+my ($top,$base,$dest) = @_;
+my $d = new DirHandle $base;
+if (defined $d) {
+ while (defined($_ = $d->read)) {
+ next if $_ eq ".";
+ next if $_ eq "..";
+ my $entry = "$base\\$_";
+ my $entrywithouttop = $entry;
+ $entrywithouttop =~ s/^$top//;
+ if (-d $entry) {splitthis ($top,$entry,$dest);}
+ else {
+ next unless ($entry=~/pm$/i);
+ #print "Will run autosplit on $entry to $dest\n";
+ autosplit($entry,$dest,0,1,1);
+ };
+ };
+ };
+}
+
+splitthis $ARGV[0],$ARGV[0],$ARGV[1];