This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Pod-Simple to CPAN version 3.35.
[perl5.git] / cpan / Pod-Simple / lib / Pod / Simple / TranscodeSmart.pm
CommitLineData
351625bd
SP
1
2require 5;
3use 5.008;
4## Anything before 5.8.0 is GIMPY!
5## This module is to be use()'d only by Pod::Simple::Transcode
6
7package Pod::Simple::TranscodeSmart;
8use strict;
9use Pod::Simple;
10require Encode;
a242eeb4 11use vars qw($VERSION );
6c309775 12$VERSION = '3.35';
351625bd
SP
13
14sub is_dumb {0}
15sub is_smart {1}
16
17sub all_encodings {
18 return Encode::->encodings(':all');
19}
20
21sub encoding_is_available {
22 return Encode::resolve_alias($_[1]);
23}
24
25sub encmodver {
26 return "Encode.pm v" .($Encode::VERSION || '?');
27}
28
29sub make_transcoder {
9dd0d393 30 my $e = Encode::find_encoding($_[1]);
351625bd
SP
31 die "WHAT ENCODING!?!?" unless $e;
32 my $x;
33 return sub {
34 foreach $x (@_) {
9dd0d393 35 $x = $e->decode($x) unless Encode::is_utf8($x);
351625bd
SP
36 }
37 return;
38 };
39}
40
41
421;
43
44