mason/.perl-lib/TrivGal.pm (listdir): Delete redundant package qualifier.
[tgal] / mason / .perl-lib / TrivGal.pm
index 600e9f5..ec011f3 100644 (file)
@@ -219,11 +219,13 @@ package TrivGal::Image {
 
   sub scale ($$) {
     my ($me, $scale) = @_;
+    my $m = HTML::Mason::Request->instance;
 
     my $path = $me->{path};
     my $sz = $SIZE{$scale} or die "unknown scale `$scale'";
     my $thumb = "$CACHE/scale.$sz/$path";
-    my $thumburl = "$CACHEURL/scale.$sz/$path";
+    my $thumburl =
+      $m->interp->apply_escapes("$CACHEURL/scale.$sz/$path", "u");
     my $st = stat $thumb;
     if (defined $st && $st->mtime > $me->{mtime}) { return $thumburl; }
 
@@ -312,7 +314,7 @@ sub listdir ($) {
          die "can't index a folder" if $indexp;
        } else {
          $list = \@f;
-         my ($dir, $base, $ext) = TrivGal::split_path $name;
+         my ($dir, $base, $ext) = split_path $name;
          die "unknown image type" unless $TYPE{lc $ext};
          if ($indexp) {
            die "two index images" if defined $ix;