Skip to content

Commit

Permalink
next version
Browse files Browse the repository at this point in the history
  • Loading branch information
tomk3003 committed Mar 25, 2019
1 parent d5c304d commit 5fe6f12
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.5 2019-03-25
- better support for relative paths

0.4 2019-03-08
- fix inconsistent entries in %INC

Expand Down
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ t/arclib/VMod.tgz
t/arclib/VMod2.tgz
t/arclib/VMod3.tgz
t/arclib/VMod4-7.0.tar.gz
t/lib/LoadRel.pm
8 changes: 4 additions & 4 deletions lib/lib/archive.pm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ first one will be used.
Relative paths will be interpreted as relative to the directory the
calling script or module resides in. So don't do a chdir() before using
lib::archive when you call your script with a relative path and use releative
lib::archive when you call your script with a relative path B<and> use releative
paths for lib::archive.
B<The module will not create any files, not even temporary. Everything is
Expand Down Expand Up @@ -103,11 +103,11 @@ sub import {
my $class = shift;
my %cache;

(my $acdir = dirname(rel2abs((caller)[1]))) =~ s!\\!/!g;
( my $acdir = dirname( rel2abs( (caller)[1] ) ) ) =~ s!\\!/!g;

for my $entry (@_) {
my $is_url = $entry =~ /$is_url/;
my $arcs = $is_url ? _get_url($entry) : _get_files($entry, $acdir);
my $arcs = $is_url ? _get_url($entry) : _get_files( $entry, $acdir );
for my $arc (@$arcs) {
my $path = $is_url ? $entry : $arc->[0];
my %tmp;
Expand Down Expand Up @@ -137,7 +137,7 @@ sub import {


sub _get_files {
my($glob, $cdir) = @_;
my ( $glob, $cdir ) = @_;
( my $glob_ux = $glob ) =~ s!\\!/!g;
$glob_ux = "$cdir/$glob_ux" unless file_name_is_absolute($glob_ux);
my @files;
Expand Down

0 comments on commit 5fe6f12

Please sign in to comment.