Simplified regex and added comment why backslashes are being converted

This commit is contained in:
Htbaa
2011-02-26 19:56:17 +01:00
parent dc52fec399
commit 0acdb2fcde
+3 -2
View File
@@ -150,8 +150,9 @@ sub _template_content {
my $self = shift;
my ($path) = @_;
my ($t) = ($path =~ m{templates[\/|\\](.*)$});
$t =~ s/\\/\//g;
# Convert backslashes to forward slashes to make inline templates work on Windows
$path =~ s/\\/\//g;
my ($t) = ($path =~ m{templates\/(.*)$});
if (-r $path) {
return $self->SUPER::_template_content(@_);