This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Some portability and clean-up for errno.t.
[perl5.git] / t / lib / Cname.pm
CommitLineData
fc8cd66c
YO
1package Cname;
2our $Evil='A';
3
4sub translator {
5 my $str = shift;
6 if ( $str eq 'EVIL' ) {
7 (my $c=substr("A".$Evil,-1))++;
8 my $r=$Evil;
9 $Evil.=$c;
10 return $r;
11 }
12 if ( $str eq 'EMPTY-STR') {
13 return "";
14 }
15 return $str;
16}
17
18sub import {
19 shift;
20 $^H{charnames} = \&translator;
21}
221;