summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/encoding.pm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-04-23 21:46:20 +0000
committerKarl Berry <karl@freefriends.org>2014-04-23 21:46:20 +0000
commit300c1eb6d37d46078d448d6d58938d5a80cd68ff (patch)
tree23a0a8b9f8f5460b405119c4d3c163d2d488ca5e /Master/tlpkg/tlperl/lib/encoding.pm
parented55d86b7c5e18f6eccce80a1fb1423ca40a23b5 (diff)
(tl)perl 5.18.2 for windows from siep
git-svn-id: svn://tug.org/texlive/trunk@33648 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/encoding.pm')
-rw-r--r--Master/tlpkg/tlperl/lib/encoding.pm16
1 files changed, 15 insertions, 1 deletions
diff --git a/Master/tlpkg/tlperl/lib/encoding.pm b/Master/tlpkg/tlperl/lib/encoding.pm
index 24d6e5b66c6..2783c9f7e67 100644
--- a/Master/tlpkg/tlperl/lib/encoding.pm
+++ b/Master/tlpkg/tlperl/lib/encoding.pm
@@ -1,4 +1,4 @@
-# $Id: encoding.pm,v 2.9 2011/08/09 07:49:44 dankogai Exp dankogai $
+# $Id: encoding.pm,v 2.11 2013/02/18 02:23:56 dankogai Exp $
package encoding;
our $VERSION = '2.6_01';
@@ -102,8 +102,16 @@ sub _get_locale_encoding {
}
sub import {
+ if ($] >= 5.017) {
+ warnings::warnif("deprecated",
+ "Use of the encoding pragma is deprecated")
+ }
my $class = shift;
my $name = shift;
+ if (!$name){
+ require Carp;
+ Carp::croak("encoding: no encoding specified.");
+ }
if ( $name eq ':_get_locale_encoding' ) { # used by lib/open.pm
my $caller = caller();
{
@@ -199,6 +207,12 @@ __END__
encoding - allows you to write your script in non-ascii or non-utf8
+=head1 WARNING
+
+This module is deprecated under perl 5.18. It uses a mechanism provided by
+perl that is deprecated under 5.18 and higher, and may be removed in a
+future version.
+
=head1 SYNOPSIS
use encoding "greek"; # Perl like Greek to you?