Harumph, also AIX will spill its guts (i.e. dump core)
[p5sagit/p5-mst-13.2.git] / lib / utf8_heavy.pl
index 5637d12..a843737 100644 (file)
@@ -34,11 +34,16 @@ sub SWASHNEW {
     } else {
        $file =~ s#^(Is|To)([A-Z].*)#$1/$2#;
     }
-    $list ||= eval { $caller->$type(); }
-       || do "$file.pl"
-       || do "$encoding/$file.pl"
-       || do "$encoding/Is/${type}.pl"
-       || croak("Can't find $encoding character property definition via $caller->$type or $file.pl");
+
+    {
+        $list ||=
+           ( exists &{"${caller}::${type}"} &&
+             eval { $caller->$type() } )
+           || do "$file.pl"
+           || do "$encoding/$file.pl"
+           || do "$encoding/Is/${type}.pl"
+           || croak("Can't find $encoding character property \"$type\"");
+    }
 
     $| = 1;