| 1 | package File::LinkDir; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | 8 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 8 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||
| 6 | 8 | ▶ | use 5.008; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | 8 | ▶ | use Cwd qw<abs_path getcwd>; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | 8 | ▶ | use File::Find; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | 8 | ▶ | use File::Path qw<remove_tree make_path>; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | 8 | ▶ | use File::Spec::Functions qw<catpath splitpath>; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||
| 12 | 8 | our $VERSION = '1.02'; | |||||||||||||||||||||||||||||||||||||||||
| 13 | 8 | $VERSION = eval $VERSION; | |||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||
| 15 | sub new | ||||||||||||||||||||||||||||||||||||||||||
| 16 | 7 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 17 | 7 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||
| 19 | 7 | my $self = {}; | |||||||||||||||||||||||||||||||||||||||||
| 20 | 7 | bless $self, $class; | |||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||
| 22 | 7 | $self->{version} = $VERSION; | |||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||
| 24 | 7 | $self->init( @_ ); | |||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||
| 26 | 7 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||
| 29 | sub init | ||||||||||||||||||||||||||||||||||||||||||
| 30 | 7 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
init: called CC=15 SCAR=27.7
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 31 | 7 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 32 | 7 | my %opt; | |||||||||||||||||||||||||||||||||||||||||
| 33 | 7 | my @opts = @_; | |||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||
| 35 | 7 | ▶ | return if $opts[0] eq 'skipinit'; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||
| 37 | 7 | $self->{addignore} = []; | |||||||||||||||||||||||||||||||||||||||||
| 38 | 7 | $self->{ignore} = '(?:.*/)?.(?:git(?!config\b).*|svn)(?:/.*)?$'; | |||||||||||||||||||||||||||||||||||||||||
| 39 | 7 | $self->{force} = 0; | |||||||||||||||||||||||||||||||||||||||||
| 40 | 7 | $self->{hard} = 0; | |||||||||||||||||||||||||||||||||||||||||
| 41 | 7 | $self->{dryrun} = 0; | |||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||
| 43 | 7 | ▶ | while( @opts ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 44 | { | ||||||||||||||||||||||||||||||||||||||||||
| 45 | 20 | my ( $opt, $value ) = ( shift @opts, shift @opts ); | |||||||||||||||||||||||||||||||||||||||||
| 46 | 20 | ▶ | if ( $opt eq 'addignore' ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 47 | { | ||||||||||||||||||||||||||||||||||||||||||
| 48 | 1 | for my $rx ( @{$value} ) | |||||||||||||||||||||||||||||||||||||||||
| 49 | { | ||||||||||||||||||||||||||||||||||||||||||
| 50 | 5 | local $@; | |||||||||||||||||||||||||||||||||||||||||
| 51 | 5 | eval { $rx = qr/$rx/ }; | |||||||||||||||||||||||||||||||||||||||||
| 52 | 5 | ▶ | die "Invalid regex passed to addignore: $@\n" if $@; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 53 | } | ||||||||||||||||||||||||||||||||||||||||||
| 54 | 1 | $self->{$opt} = $value; | |||||||||||||||||||||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||||||||||||||||||||||
| 56 | else | ||||||||||||||||||||||||||||||||||||||||||
| 57 | { | ||||||||||||||||||||||||||||||||||||||||||
| 58 | 19 | $self->{$opt} = $value; | |||||||||||||||||||||||||||||||||||||||||
| 59 | } | ||||||||||||||||||||||||||||||||||||||||||
| 60 | } | ||||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||
| 62 | { | ||||||||||||||||||||||||||||||||||||||||||
| 63 | 7 | local $@; | |||||||||||||||||||||||||||||||||||||||||
| 64 | 7 | eval { $self->{ignore} = qr/$self->{ignore}/ }; | |||||||||||||||||||||||||||||||||||||||||
| 65 | 7 | ▶ | die "Invalid regex passed to ignore: $@\n" if $@; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 66 | } | ||||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||
| 68 | 7 | for my $rx ( @{ $self->{addignore} } ) | |||||||||||||||||||||||||||||||||||||||||
| 69 | { | ||||||||||||||||||||||||||||||||||||||||||
| 70 | 5 | local $@; | |||||||||||||||||||||||||||||||||||||||||
| 71 | 5 | eval { $rx = qr/$rx/ }; | |||||||||||||||||||||||||||||||||||||||||
| 72 | 5 | ▶ | die "Invalid regex passed to addignore: $@\n" if $@; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 73 | } | ||||||||||||||||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||||||||||||||||
| 75 | 7 | ▶ | die "You must supply a source directory\n" unless ( defined $self->{source} ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 76 | 7 | $self->{source} = abs_path( $self->{source} ); | |||||||||||||||||||||||||||||||||||||||||
| 77 | 7 | ▶ | die "You must supply a valid source directory\n" unless ( -d $self->{source} ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 78 | 7 | ▶ | $self->{source} =~ /^(.*)$/ && ($self->{source} = $1); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||||||||||||||||
| 80 | 7 | ▶ | die "You must supply a dest directory\n" unless ( defined $self->{dest} ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 81 | 7 | $self->{dest} = abs_path( $self->{dest} ); | |||||||||||||||||||||||||||||||||||||||||
| 82 | 7 | ▶ | die "You must supply a valid dest directory\n" unless ( -d $self->{dest} ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 83 | 7 | ▶ | $self->{dest} =~ /^(.*)$/ && ($self->{dest} = $1); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 84 | } | ||||||||||||||||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||||||||||||||||
| 86 | sub run | ||||||||||||||||||||||||||||||||||||||||||
| 87 | 6 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
run: called CC=5 SCAR=16.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 88 | 6 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||||||||||||
| 90 | 6 | my $pwd = getcwd(); | |||||||||||||||||||||||||||||||||||||||||
| 91 | 6 | ▶ | $pwd =~ /^(.*)$/ && ($pwd = $1); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||||||||||||||||
| 93 | 6 | ▶ | chdir $self->{source} or die "Couldn't chdir to '$self->{source}'\n"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||||||||||||||||
| 95 | $self->{recursive} | ||||||||||||||||||||||||||||||||||||||||||
| 96 | 40 | ▶ | ? find( { wanted => sub { $self->_recursive() }, no_chdir => 1 }, $self->{source} ) | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 97 | 6 | ▶ | : $self->_normal(); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||||||||||||||||
| 99 | 6 | ▶ | chdir $pwd or die "Couldn't chdir to '$pwd'\n"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 100 | } | ||||||||||||||||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||||||||||||||||
| 102 | sub _recursive | ||||||||||||||||||||||||||||||||||||||||||
| 103 | 40 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_recursive: called CC=28 SCAR=51.5
| |||||||||||||||||||||||||||||||||||||||||||
| 104 | 40 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||||||||||||||||
| 106 | 40 | my $source = $self->{source}; | |||||||||||||||||||||||||||||||||||||||||
| 107 | 40 | my $dest = $self->{dest}; | |||||||||||||||||||||||||||||||||||||||||
| 108 | |||||||||||||||||||||||||||||||||||||||||||
| 109 | 40 | my $file = $File::Find::name; | |||||||||||||||||||||||||||||||||||||||||
| 110 | 40 | $file =~ s{^$source/}{}; | |||||||||||||||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||||||||||||||
| 112 | 40 | ▶ | return if $file =~ $self->{ignore}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 113 | 0 | ▶ | return if grep { $file =~ /$_/ } @{ $self->{addignore} }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 114 | 40 | ▶ | return unless -f $file || -l $file; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
-f $file or -l $file
MC/DC50%1/2
-f $file or -l $file
-f $file
-l $file
Truth table66%2/3
A or B
A= -f $fileB= -l $file
| |||||||||||||||||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||||||||||||||||
| 116 | 36 | ▶ | if ( -l $file && -l "$dest/$file") | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
-l $file and -l "$dest/$file"
MC/DC0%0/2
-l $file and -l "$dest/$file"
-l $file
-l "$dest/$file"
Truth table33%1/3
A and B
A= -l $fileB= -l "$dest/$file"
| |||||||||||||||||||||||||||||||||||||||||||
| 117 | { | ||||||||||||||||||||||||||||||||||||||||||
| 118 | # skip if it's a link which is already in place | ||||||||||||||||||||||||||||||||||||||||||
| 119 | 0 | ▶ | return if readlink( $file ) eq readlink( "$dest/$file" ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 120 | } | ||||||||||||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||||||||||||
| 122 | 36 | ▶ | if ( ! -l $file && -l "$dest/$file" && stat "$dest/$file" ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
not -l $file and -l "$dest/$file" and stat "$dest/$file"
not -l $file and -l "$dest/$file"
MC/DC0%0/3
not -l $file and -l "$dest/$file" and stat "$dest/$file"
not -l $file
-l "$dest/$file"
stat "$dest/$file"
Truth table25%1/4
not(A) and B and C
A= not -l $fileB= -l "$dest/$file"C= stat "$dest/$file"
| |||||||||||||||||||||||||||||||||||||||||||
| 123 | { | ||||||||||||||||||||||||||||||||||||||||||
| 124 | # skip if it's file that has already been linked | ||||||||||||||||||||||||||||||||||||||||||
| 125 | 0 | ▶ | return if ( stat "$dest/$file" )[1] == ( stat $file )[1]; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 126 | } | ||||||||||||||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||||||||||||||
| 128 | 36 | ▶ | if ( -e "$dest/$file" || -l "$dest/$file" ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
-e "$dest/$file" or -l "$dest/$file"
MC/DC0%0/2
-e "$dest/$file" or -l "$dest/$file"
-e "$dest/$file"
-l "$dest/$file"
Truth table33%1/3
A or B
A= -e "$dest/$file"B= -l "$dest/$file"
| |||||||||||||||||||||||||||||||||||||||||||
| 129 | { | ||||||||||||||||||||||||||||||||||||||||||
| 130 | 0 | ▶ | if ( ! -l "$dest/$file" && -d "$dest/$file" ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
not -l "$dest/$file" and -d "$dest/$file"
MC/DC0%0/2
not -l "$dest/$file" and -d "$dest/$file"
not -l "$dest/$file"
-d "$dest/$file"
Truth table0%0/3
not(A) and B
A= not -l "$dest/$file"B= -d "$dest/$file"
| |||||||||||||||||||||||||||||||||||||||||||
| 131 | { | ||||||||||||||||||||||||||||||||||||||||||
| 132 | 0 | warn "Won't replace dir '$dest/$file' with a link\n"; | |||||||||||||||||||||||||||||||||||||||||
| 133 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 134 | } | ||||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||||
| 136 | 0 | ▶ | if ( ! $self->{force} ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 137 | { | ||||||||||||||||||||||||||||||||||||||||||
| 138 | $self->{dryrun} | ||||||||||||||||||||||||||||||||||||||||||
| 139 | 0 | ▶ | ? warn "force is off, would not overwrite '$dest/$file'\n" | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 140 | : warn "force is off, not overwriting '$dest/$file'\n" | ||||||||||||||||||||||||||||||||||||||||||
| 141 | ; | ||||||||||||||||||||||||||||||||||||||||||
| 142 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 143 | } | ||||||||||||||||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||||||||||||||||
| 145 | 0 | ▶ | if ( $self->{dryrun} ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 146 | { | ||||||||||||||||||||||||||||||||||||||||||
| 147 | 0 | warn "Would overwrite '$dest/$file' -> '$source/$file'\n"; | |||||||||||||||||||||||||||||||||||||||||
| 148 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 149 | } | ||||||||||||||||||||||||||||||||||||||||||
| 150 | else | ||||||||||||||||||||||||||||||||||||||||||
| 151 | { | ||||||||||||||||||||||||||||||||||||||||||
| 152 | 0 | ▶ | warn "Overwriting '$dest/$file' -> '$source/$file'\n" if $self->{verbose}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 153 | 0 | ▶ | if ( ! unlink "$dest/$file" ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 154 | { | ||||||||||||||||||||||||||||||||||||||||||
| 155 | 0 | warn "Can't remove '$dest/$file': $!\n"; | |||||||||||||||||||||||||||||||||||||||||
| 156 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 157 | } | ||||||||||||||||||||||||||||||||||||||||||
| 158 | } | ||||||||||||||||||||||||||||||||||||||||||
| 159 | } | ||||||||||||||||||||||||||||||||||||||||||
| 160 | else | ||||||||||||||||||||||||||||||||||||||||||
| 161 | { | ||||||||||||||||||||||||||||||||||||||||||
| 162 | 36 | ▶ | if ( $self->{dryrun} ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 163 | { | ||||||||||||||||||||||||||||||||||||||||||
| 164 | 0 | warn "Would create '$dest/$file' --> '$source/$file'\n"; | |||||||||||||||||||||||||||||||||||||||||
| 165 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 166 | } | ||||||||||||||||||||||||||||||||||||||||||
| 167 | 36 | ▶ | warn "Creating '$dest/$file' -> '$source/$file'\n" if $self->{verbose}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 168 | } | ||||||||||||||||||||||||||||||||||||||||||
| 169 | 36 | my $path = catpath( ( splitpath( "$dest/$file" ) )[0,1], '' ); | |||||||||||||||||||||||||||||||||||||||||
| 170 | 36 | ▶ | if ( ! -d $path ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 171 | { | ||||||||||||||||||||||||||||||||||||||||||
| 172 | 2 | local $@; | |||||||||||||||||||||||||||||||||||||||||
| 173 | 2 | eval { make_path($path) }; | |||||||||||||||||||||||||||||||||||||||||
| 174 | 2 | ▶ | if ( $@ ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 175 | { | ||||||||||||||||||||||||||||||||||||||||||
| 176 | 0 | warn "Failed to create dir '$path': $@\n"; | |||||||||||||||||||||||||||||||||||||||||
| 177 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 178 | } | ||||||||||||||||||||||||||||||||||||||||||
| 179 | } | ||||||||||||||||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||||||||||||||||
| 181 | my $success = -l $file | ||||||||||||||||||||||||||||||||||||||||||
| 182 | ? symlink readlink($file), "$dest/$file" | ||||||||||||||||||||||||||||||||||||||||||
| 183 | : $self->{hard} | ||||||||||||||||||||||||||||||||||||||||||
| 184 | 36 | ▶ | ? link "$source/$file", "$dest/$file" | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 185 | : symlink "$source/$file", "$dest/$file"; | ||||||||||||||||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||||||||||||||||
| 187 | 36 | ▶ | warn "Can't create '$dest/$file': $!\n" unless $success; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 188 | } | ||||||||||||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||||||||||||
| 190 | sub _normal | ||||||||||||||||||||||||||||||||||||||||||
| 191 | 4 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_normal: called CC=25 SCAR=47.6
| |||||||||||||||||||||||||||||||||||||||||||
| 192 | 4 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||||||||||||||||
| 194 | 4 | my $source = $self->{source}; | |||||||||||||||||||||||||||||||||||||||||
| 195 | 4 | my $dest = $self->{dest}; | |||||||||||||||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||||||||||||||||
| 197 | 4 | ▶ | opendir my $dir_handle, $source or die "Can't open the dir $source: $!; aborted"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||||||||||||||||
| 199 | 4 | ▶ | while ( defined ( my $file = readdir $dir_handle ) ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 200 | { | ||||||||||||||||||||||||||||||||||||||||||
| 201 | 48 | ▶ | $file =~ /^(.*)$/ && ($file = $1); # I'm open to suggestions | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 202 | |||||||||||||||||||||||||||||||||||||||||||
| 203 | 48 | ▶ | next if $file =~ /^\.{1,2}$/; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 204 | 40 | ▶ | next if $file =~ $self->{ignore}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 205 | 36 | ▶ | next if grep { $file =~ /$_/ } @{ $self->{addignore} }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||||||||||||||||
| 207 | 31 | ▶ | if ( -l "$dest/$file" && stat "$dest/$file" ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
-l "$dest/$file" and stat "$dest/$file"
MC/DC0%0/2
-l "$dest/$file" and stat "$dest/$file"
-l "$dest/$file"
stat "$dest/$file"
Truth table33%1/3
A and B
A= -l "$dest/$file"B= stat "$dest/$file"
| |||||||||||||||||||||||||||||||||||||||||||
| 208 | { | ||||||||||||||||||||||||||||||||||||||||||
| 209 | 0 | ▶ | next if ( stat "$dest/$file" )[1] == ( stat $file )[1]; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 210 | } | ||||||||||||||||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||||||||||||||||
| 212 | 31 | ▶ | if ( -e "$dest/$file" || -l "$dest/$file" ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
-e "$dest/$file" or -l "$dest/$file"
MC/DC0%0/2
-e "$dest/$file" or -l "$dest/$file"
-e "$dest/$file"
-l "$dest/$file"
Truth table33%1/3
A or B
A= -e "$dest/$file"B= -l "$dest/$file"
| |||||||||||||||||||||||||||||||||||||||||||
| 213 | { | ||||||||||||||||||||||||||||||||||||||||||
| 214 | 0 | ▶ | if ( ! $self->{force} ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 215 | { | ||||||||||||||||||||||||||||||||||||||||||
| 216 | $self->{dryrun} | ||||||||||||||||||||||||||||||||||||||||||
| 217 | 0 | ▶ | ? warn "force is off, would not overwrite '$dest/$file'\n" | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 218 | : warn "force is off, not overwriting '$dest/$file'\n" | ||||||||||||||||||||||||||||||||||||||||||
| 219 | ; | ||||||||||||||||||||||||||||||||||||||||||
| 220 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||
| 221 | } | ||||||||||||||||||||||||||||||||||||||||||
| 222 | |||||||||||||||||||||||||||||||||||||||||||
| 223 | 0 | ▶ | if ( $self->{dryrun} ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 224 | { | ||||||||||||||||||||||||||||||||||||||||||
| 225 | 0 | warn "Would overwrite '$dest/$file' -> '$source/$file'\n"; | |||||||||||||||||||||||||||||||||||||||||
| 226 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||
| 227 | } | ||||||||||||||||||||||||||||||||||||||||||
| 228 | else | ||||||||||||||||||||||||||||||||||||||||||
| 229 | { | ||||||||||||||||||||||||||||||||||||||||||
| 230 | 0 | ▶ | warn "Overwriting '$dest/$file' -> '$source/$file'\n" if $self->{verbose}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 231 | |||||||||||||||||||||||||||||||||||||||||||
| 232 | 0 | ▶ | if ( -d "$dest/$file" ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 233 | { | ||||||||||||||||||||||||||||||||||||||||||
| 234 | 0 | local $@; | |||||||||||||||||||||||||||||||||||||||||
| 235 | 0 | eval { remove_tree("$dest/$file") }; | |||||||||||||||||||||||||||||||||||||||||
| 236 | 0 | ▶ | if ( $@ ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 237 | { | ||||||||||||||||||||||||||||||||||||||||||
| 238 | 0 | warn "Failed to remove directory '$dest/$file': $@\n"; | |||||||||||||||||||||||||||||||||||||||||
| 239 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||
| 240 | } | ||||||||||||||||||||||||||||||||||||||||||
| 241 | } | ||||||||||||||||||||||||||||||||||||||||||
| 242 | elsif ( ! unlink( "$dest/$file" ) ) | ||||||||||||||||||||||||||||||||||||||||||
| 243 | { | ||||||||||||||||||||||||||||||||||||||||||
| 244 | 0 | warn "Failed to remove file '$dest/$file': $!\n"; | |||||||||||||||||||||||||||||||||||||||||
| 245 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||
| 246 | } | ||||||||||||||||||||||||||||||||||||||||||
| 247 | } | ||||||||||||||||||||||||||||||||||||||||||
| 248 | } | ||||||||||||||||||||||||||||||||||||||||||
| 249 | |||||||||||||||||||||||||||||||||||||||||||
| 250 | 31 | ▶ | if ( $self->{dryrun} ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 251 | { | ||||||||||||||||||||||||||||||||||||||||||
| 252 | 0 | warn "Would create '$dest/$file' -> '$source/$file'\n"; | |||||||||||||||||||||||||||||||||||||||||
| 253 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||
| 254 | } | ||||||||||||||||||||||||||||||||||||||||||
| 255 | |||||||||||||||||||||||||||||||||||||||||||
| 256 | 31 | ▶ | warn "Creating '$dest/$file' -> '$source/$file'\n" if $self->{verbose}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 257 | 31 | ▶ | if ( $self->{hard} ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 258 | { | ||||||||||||||||||||||||||||||||||||||||||
| 259 | 10 | ▶ | if ( -d "$source/$file" ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 260 | { | ||||||||||||||||||||||||||||||||||||||||||
| 261 | 1 | warn "Can't create '$dest/$file' as a hard link, skipping\n"; | |||||||||||||||||||||||||||||||||||||||||
| 262 | } | ||||||||||||||||||||||||||||||||||||||||||
| 263 | else | ||||||||||||||||||||||||||||||||||||||||||
| 264 | { | ||||||||||||||||||||||||||||||||||||||||||
| 265 | 9 | ▶ | link "$source/$file", "$dest/$file" or warn "Can't create '$dest/$file': $!\n"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 266 | } | ||||||||||||||||||||||||||||||||||||||||||
| 267 | } | ||||||||||||||||||||||||||||||||||||||||||
| 268 | else | ||||||||||||||||||||||||||||||||||||||||||
| 269 | { | ||||||||||||||||||||||||||||||||||||||||||
| 270 | 21 | ▶ | symlink "$source/$file", "$dest/$file" or warn "Can't create '$dest/$file': $!\n"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 271 | } | ||||||||||||||||||||||||||||||||||||||||||
| 272 | } | ||||||||||||||||||||||||||||||||||||||||||
| 273 | } | ||||||||||||||||||||||||||||||||||||||||||
| 274 | |||||||||||||||||||||||||||||||||||||||||||
| 275 | =pod | ||||||||||||||||||||||||||||||||||||||||||
| 276 | |||||||||||||||||||||||||||||||||||||||||||
| 277 | =encoding utf-8 | ||||||||||||||||||||||||||||||||||||||||||
| 278 | |||||||||||||||||||||||||||||||||||||||||||
| 279 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||
| 280 | |||||||||||||||||||||||||||||||||||||||||||
| 281 | File::LinkDir - Create links in one directory for files in another | ||||||||||||||||||||||||||||||||||||||||||
| 282 | |||||||||||||||||||||||||||||||||||||||||||
| 283 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||||||||||||||||
| 284 | |||||||||||||||||||||||||||||||||||||||||||
| 285 | use File::LinkDir; | ||||||||||||||||||||||||||||||||||||||||||
| 286 | my $linkdir = File::LinkDir->new( 'source' => '/path/to/dir', 'dest' => '/dest/path', 'hard' => 1, 'recursive' => 1 ); | ||||||||||||||||||||||||||||||||||||||||||
| 287 | $linkdir->run(); | ||||||||||||||||||||||||||||||||||||||||||
| 288 | $linkdir->init( 'source' => '/new/path', 'dest' => '/new/dest', ); | ||||||||||||||||||||||||||||||||||||||||||
| 289 | $linkdir->run(); | ||||||||||||||||||||||||||||||||||||||||||
| 290 | |||||||||||||||||||||||||||||||||||||||||||
| 291 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||||
| 292 | |||||||||||||||||||||||||||||||||||||||||||
| 293 | By default, File::LinkDir will create symlinks in the destination directory for all top-level files, directories or symlinks found in the source directory. This is very useful for keeping the dot files in your C<$HOME> under version control. A typical use case: | ||||||||||||||||||||||||||||||||||||||||||
| 294 | |||||||||||||||||||||||||||||||||||||||||||
| 295 | use File::LinkDir; | ||||||||||||||||||||||||||||||||||||||||||
| 296 | my $linkdir = File::LinkDir->new( 'source' => '.', 'dest' => '~' ); | ||||||||||||||||||||||||||||||||||||||||||
| 297 | $linkdir->run(); | ||||||||||||||||||||||||||||||||||||||||||
| 298 | |||||||||||||||||||||||||||||||||||||||||||
| 299 | =head1 METHODS | ||||||||||||||||||||||||||||||||||||||||||
| 300 | |||||||||||||||||||||||||||||||||||||||||||
| 301 | =head2 new | ||||||||||||||||||||||||||||||||||||||||||
| 302 | |||||||||||||||||||||||||||||||||||||||||||
| 303 | Creates a new File::LinkDir object. This will call init() to set the options unless you pass 'skipinit' as the first argument. | ||||||||||||||||||||||||||||||||||||||||||
| 304 | |||||||||||||||||||||||||||||||||||||||||||
| 305 | =head2 init | ||||||||||||||||||||||||||||||||||||||||||
| 306 | |||||||||||||||||||||||||||||||||||||||||||
| 307 | Initializes the object according to the options that were passed. This is automatically called by new() but can be called if you want to reuse the object for other directories. | ||||||||||||||||||||||||||||||||||||||||||
| 308 | |||||||||||||||||||||||||||||||||||||||||||
| 309 | =head2 run | ||||||||||||||||||||||||||||||||||||||||||
| 310 | |||||||||||||||||||||||||||||||||||||||||||
| 311 | Creates the links based on the options that were used in new() and/or init(). | ||||||||||||||||||||||||||||||||||||||||||
| 312 | |||||||||||||||||||||||||||||||||||||||||||
| 313 | =head1 OPTIONS | ||||||||||||||||||||||||||||||||||||||||||
| 314 | |||||||||||||||||||||||||||||||||||||||||||
| 315 | =head2 dryrun | ||||||||||||||||||||||||||||||||||||||||||
| 316 | |||||||||||||||||||||||||||||||||||||||||||
| 317 | C<dryrun =E<gt> 1> | ||||||||||||||||||||||||||||||||||||||||||
| 318 | |||||||||||||||||||||||||||||||||||||||||||
| 319 | Prints what would have been done without actually doing it. | ||||||||||||||||||||||||||||||||||||||||||
| 320 | |||||||||||||||||||||||||||||||||||||||||||
| 321 | =head2 source | ||||||||||||||||||||||||||||||||||||||||||
| 322 | |||||||||||||||||||||||||||||||||||||||||||
| 323 | C<source =E<gt> DIR> | ||||||||||||||||||||||||||||||||||||||||||
| 324 | |||||||||||||||||||||||||||||||||||||||||||
| 325 | The source directory. | ||||||||||||||||||||||||||||||||||||||||||
| 326 | |||||||||||||||||||||||||||||||||||||||||||
| 327 | =head2 dest | ||||||||||||||||||||||||||||||||||||||||||
| 328 | |||||||||||||||||||||||||||||||||||||||||||
| 329 | C<dest =E<gt> DIR> | ||||||||||||||||||||||||||||||||||||||||||
| 330 | |||||||||||||||||||||||||||||||||||||||||||
| 331 | The destination directory. | ||||||||||||||||||||||||||||||||||||||||||
| 332 | |||||||||||||||||||||||||||||||||||||||||||
| 333 | =head2 recursive | ||||||||||||||||||||||||||||||||||||||||||
| 334 | |||||||||||||||||||||||||||||||||||||||||||
| 335 | C<recursive =E<gt> 1> | ||||||||||||||||||||||||||||||||||||||||||
| 336 | |||||||||||||||||||||||||||||||||||||||||||
| 337 | With C<recursive =E<gt> 1>, it will not create symlinks to subdirectories | ||||||||||||||||||||||||||||||||||||||||||
| 338 | found in the source directory. It will instead recurse into them and create | ||||||||||||||||||||||||||||||||||||||||||
| 339 | symlinks for any files or symlinks it finds. Any subdirectories not found in | ||||||||||||||||||||||||||||||||||||||||||
| 340 | the destination directory will be created. This approach is useful for | ||||||||||||||||||||||||||||||||||||||||||
| 341 | destination directories where programs or users other than yourself might add | ||||||||||||||||||||||||||||||||||||||||||
| 342 | things to subdirectories which you don't want ending up in your working tree | ||||||||||||||||||||||||||||||||||||||||||
| 343 | implicitly. F</etc> is a good example. | ||||||||||||||||||||||||||||||||||||||||||
| 344 | |||||||||||||||||||||||||||||||||||||||||||
| 345 | In both cases, symlinks from the source directory will be copied as-is. This | ||||||||||||||||||||||||||||||||||||||||||
| 346 | makes sense because the symlinks might be relative. | ||||||||||||||||||||||||||||||||||||||||||
| 347 | |||||||||||||||||||||||||||||||||||||||||||
| 348 | =head2 ignore | ||||||||||||||||||||||||||||||||||||||||||
| 349 | |||||||||||||||||||||||||||||||||||||||||||
| 350 | C<ignore =E<gt> RX> | ||||||||||||||||||||||||||||||||||||||||||
| 351 | |||||||||||||||||||||||||||||||||||||||||||
| 352 | RX is a regex matching files to ignore. If C<ignore =E<gt> 1> is not | ||||||||||||||||||||||||||||||||||||||||||
| 353 | specified, it defaults to ignoring F<.git> (plus F<.gitignore>, | ||||||||||||||||||||||||||||||||||||||||||
| 354 | F<.gitmodules>, etc, but not F<.gitconfig>) and F<.svn> directories and | ||||||||||||||||||||||||||||||||||||||||||
| 355 | their contents. | ||||||||||||||||||||||||||||||||||||||||||
| 356 | |||||||||||||||||||||||||||||||||||||||||||
| 357 | =head2 addignore | ||||||||||||||||||||||||||||||||||||||||||
| 358 | |||||||||||||||||||||||||||||||||||||||||||
| 359 | C<addignore =E<gt> RX> | ||||||||||||||||||||||||||||||||||||||||||
| 360 | |||||||||||||||||||||||||||||||||||||||||||
| 361 | Like C<ignore =E<gt> RX> but doesn't replace the default. | ||||||||||||||||||||||||||||||||||||||||||
| 362 | |||||||||||||||||||||||||||||||||||||||||||
| 363 | =head2 force | ||||||||||||||||||||||||||||||||||||||||||
| 364 | |||||||||||||||||||||||||||||||||||||||||||
| 365 | C<force =E<gt> 1> | ||||||||||||||||||||||||||||||||||||||||||
| 366 | |||||||||||||||||||||||||||||||||||||||||||
| 367 | Remove and/or overwrite existing files/dirs. | ||||||||||||||||||||||||||||||||||||||||||
| 368 | |||||||||||||||||||||||||||||||||||||||||||
| 369 | =head2 hard | ||||||||||||||||||||||||||||||||||||||||||
| 370 | |||||||||||||||||||||||||||||||||||||||||||
| 371 | C<hard =E<gt> 1> | ||||||||||||||||||||||||||||||||||||||||||
| 372 | |||||||||||||||||||||||||||||||||||||||||||
| 373 | Creates hard links instead of symlinks. | ||||||||||||||||||||||||||||||||||||||||||
| 374 | |||||||||||||||||||||||||||||||||||||||||||
| 375 | =head1 AUTHOR | ||||||||||||||||||||||||||||||||||||||||||
| 376 | |||||||||||||||||||||||||||||||||||||||||||
| 377 | Hinrik Örn Sigurðsson, E<lt>hinrik.sig@gmail.comE<gt> | ||||||||||||||||||||||||||||||||||||||||||
| 378 | Matthew Musgrove, E<lt>mr.muskrat@gmail.comE<gt> | ||||||||||||||||||||||||||||||||||||||||||
| 379 | |||||||||||||||||||||||||||||||||||||||||||
| 380 | =head1 BUGS | ||||||||||||||||||||||||||||||||||||||||||
| 381 | |||||||||||||||||||||||||||||||||||||||||||
| 382 | Please report any bugs or feature requests to C<bug-file-linkdir at rt.cpan.org>, or through | ||||||||||||||||||||||||||||||||||||||||||
| 383 | the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-LinkDir>. I will be notified, and then you'll | ||||||||||||||||||||||||||||||||||||||||||
| 384 | automatically be notified of progress on your bug as I make changes. | ||||||||||||||||||||||||||||||||||||||||||
| 385 | |||||||||||||||||||||||||||||||||||||||||||
| 386 | =head1 SUPPORT | ||||||||||||||||||||||||||||||||||||||||||
| 387 | |||||||||||||||||||||||||||||||||||||||||||
| 388 | You can find documentation for this module with the perldoc command. | ||||||||||||||||||||||||||||||||||||||||||
| 389 | |||||||||||||||||||||||||||||||||||||||||||
| 390 | perldoc File::LinkDir | ||||||||||||||||||||||||||||||||||||||||||
| 391 | |||||||||||||||||||||||||||||||||||||||||||
| 392 | |||||||||||||||||||||||||||||||||||||||||||
| 393 | You can also look for information at: | ||||||||||||||||||||||||||||||||||||||||||
| 394 | |||||||||||||||||||||||||||||||||||||||||||
| 395 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 396 | |||||||||||||||||||||||||||||||||||||||||||
| 397 | =item * RT: CPAN's request tracker | ||||||||||||||||||||||||||||||||||||||||||
| 398 | |||||||||||||||||||||||||||||||||||||||||||
| 399 | L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=File-LinkDir> | ||||||||||||||||||||||||||||||||||||||||||
| 400 | |||||||||||||||||||||||||||||||||||||||||||
| 401 | =item * AnnoCPAN: Annotated CPAN documentation | ||||||||||||||||||||||||||||||||||||||||||
| 402 | |||||||||||||||||||||||||||||||||||||||||||
| 403 | L<http://annocpan.org/dist/File-LinkDir> | ||||||||||||||||||||||||||||||||||||||||||
| 404 | |||||||||||||||||||||||||||||||||||||||||||
| 405 | =item * CPAN Ratings | ||||||||||||||||||||||||||||||||||||||||||
| 406 | |||||||||||||||||||||||||||||||||||||||||||
| 407 | L<http://cpanratings.perl.org/d/File-LinkDir> | ||||||||||||||||||||||||||||||||||||||||||
| 408 | |||||||||||||||||||||||||||||||||||||||||||
| 409 | =item * Search CPAN | ||||||||||||||||||||||||||||||||||||||||||
| 410 | |||||||||||||||||||||||||||||||||||||||||||
| 411 | L<http://search.cpan.org/dist/File-LinkDir/> | ||||||||||||||||||||||||||||||||||||||||||
| 412 | |||||||||||||||||||||||||||||||||||||||||||
| 413 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 414 | |||||||||||||||||||||||||||||||||||||||||||
| 415 | =head1 COPYRIGHT | ||||||||||||||||||||||||||||||||||||||||||
| 416 | |||||||||||||||||||||||||||||||||||||||||||
| 417 | Copyright (c) 2009-2010 Hinrik Örn Sigurðsson and Matthew Musgrove | ||||||||||||||||||||||||||||||||||||||||||
| 418 | |||||||||||||||||||||||||||||||||||||||||||
| 419 | =head1 LICENSE | ||||||||||||||||||||||||||||||||||||||||||
| 420 | |||||||||||||||||||||||||||||||||||||||||||
| 421 | This program is free software; you can redistribute it and/or modify it | ||||||||||||||||||||||||||||||||||||||||||
| 422 | under the terms of either: the GNU General Public License as published | ||||||||||||||||||||||||||||||||||||||||||
| 423 | by the Free Software Foundation; or the Artistic License. | ||||||||||||||||||||||||||||||||||||||||||
| 424 | |||||||||||||||||||||||||||||||||||||||||||
| 425 | See http://dev.perl.org/licenses/ for more information. | ||||||||||||||||||||||||||||||||||||||||||
| 426 | |||||||||||||||||||||||||||||||||||||||||||
| 427 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 428 | |||||||||||||||||||||||||||||||||||||||||||
| 429 | 8 | 1; # End of File::LinkDir | |||||||||||||||||||||||||||||||||||||||||
| 430 | |||||||||||||||||||||||||||||||||||||||||||