Permalink
Browse files

make relative results work with subclasses

  • Loading branch information...
1 parent 14df248 commit af78e6d043dc6138f271ddfa7aa09c0b7a382b0c @xdg xdg committed Mar 8, 2013
Showing with 10 additions and 6 deletions.
  1. +4 −0 Changes
  2. +3 −3 META.json
  3. +1 −1 README.pod
  4. +2 −2 lib/Path/Iterator/Rule.pm
View
@@ -2,6 +2,10 @@ Revision history for Path-Iterator-Rule
{{$NEXT}}
+ [FIXED]
+
+ - Returning relative results now works with subclasses
+
1.001 2013-03-02 08:50:25 America/New_York
[FIXED]
View
@@ -75,11 +75,11 @@
"provides" : {
"PIR" : {
"file" : "lib/PIR.pm",
- "version" : "1.001"
+ "version" : "1.002"
},
"Path::Iterator::Rule" : {
"file" : "lib/Path/Iterator/Rule.pm",
- "version" : "1.001"
+ "version" : "1.002"
}
},
"release_status" : "stable",
@@ -94,7 +94,7 @@
"web" : "https://github.com/dagolden/path-iterator-rule"
}
},
- "version" : "1.001",
+ "version" : "1.002",
"x_contributors" : [
"Graham Knop <haarg@haarg.org>"
]
View
@@ -6,7 +6,7 @@ Path::Iterator::Rule - Iterative, recursive file finder
=head1 VERSION
-version 1.001
+version 1.002
=head1 SYNOPSIS
@@ -226,7 +226,7 @@ sub _iter {
if ($opt_depthfirst) {
# for postorder, requeue as reference to signal it can be returned
# without being retested
- push @next, [ ( $opt_relative ? File::Spec->abs2rel( $item, $origin ) : $item ) ],
+ push @next, [ ( $opt_relative ? $self->_objectify(File::Spec->abs2rel( $string_item, $origin )) : $item ) ],
$base, $depth, $origin
if $interest && $opt_depthfirst > 0;
unshift @queue, @next;
@@ -237,7 +237,7 @@ sub _iter {
}
}
}
- return ( $opt_relative ? File::Spec->abs2rel( $item, $origin ) : $item )
+ return ( $opt_relative ? $self->_objectify(File::Spec->abs2rel( $string_item, $origin )) : $item )
if $interest;
redo LOOP;
}

0 comments on commit af78e6d

Please sign in to comment.