Skip to content

Instantly share code, notes, and snippets.

@nihen
Created August 9, 2010 03:55
Show Gist options
  • Save nihen/514919 to your computer and use it in GitHub Desktop.
Save nihen/514919 to your computer and use it in GitHub Desktop.
diff --git lib/Text/Xslate.pm lib/Text/Xslate.pm
index b2f65a9..4de8ec1 100644
--- lib/Text/Xslate.pm
+++ lib/Text/Xslate.pm
@@ -228,7 +228,7 @@ sub find_file {
$cachepath = File::Spec->catfile(
$self->{cache_dir},
- Text::Xslate::uri_escape(ref($p) ? ref $p : $p),
+ Text::Xslate::uri_escape(ref($p) ? ( overload::Method($p, q{""}) ? "$p" : ref $p ) : $p),
$file . 'c',
);
$cache_mtime = (stat($cachepath))[_ST_MTIME]; # may fail, but doesn't matter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment