Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / auto / Inline / rmpath.al
CommitLineData
86530b38
AT
1# NOTE: Derived from blib/lib/Inline.pm.
2# Changes made here will be lost when autosplit is run again.
3# See AutoSplit.pm.
4package Inline;
5
6#line 1182 "blib/lib/Inline.pm (autosplit into blib/lib/auto/Inline/rmpath.al)"
7#==============================================================================
8# Nuke a path (nicely)
9#==============================================================================
10sub rmpath {
11 use strict;
12 my ($o, $prefix, $rmpath) = @_;
13# Nuke the target directory
14 _rmtree(File::Spec->catdir($prefix ? ($prefix,$rmpath) : ($rmpath)));
15# Remove any empty directories underneath the requested one
16 my @parts = File::Spec->splitdir($rmpath);
17 while (@parts){
18 $rmpath = File::Spec->catdir($prefix ? ($prefix,@parts) : @parts);
19 rmdir $rmpath
20 or last; # rmdir failed because dir was not empty
21 pop @parts;
22 }
23}
24
25# end of Inline::rmpath
261;