EBCDIC: the encoding pragma would need some rethinking,
[p5sagit/p5-mst-13.2.git] / lib / encoding.pm
index 642726d..1504a92 100644 (file)
@@ -4,6 +4,13 @@ our $VERSION = '1.00';
 
 use Encode;
 
+BEGIN {
+    if (ord("A") == 193) {
+       require Carp;
+       Carp::croak "encoding pragma does not support EBCDIC platforms";
+    }
+}
+
 sub import {
     my ($class, $name) = @_;
     $name = $ENV{PERL_ENCODING} if @_ < 2;
@@ -94,6 +101,8 @@ For native multibyte encodings (either fixed or variable length)
 the current implementation of the regular expressions may introduce
 recoding errors for longer regular expression literals than 127 bytes.
 
+The encoding pragma is not supported on EBCDIC platforms.
+
 =head1 SEE ALSO
 
 L<perlunicode>, L<Encode>