Move autodie from ext/ to cpan/
[p5sagit/p5-mst-13.2.git] / cpan / autodie / t / lib / pujHa / ghach / Dotlh.pm
CommitLineData
0b09a93a 1package pujHa'ghach::Dotlh;
2
3# Translator notes: Dotlh = status
4
5# Ideally this should be le'wI' - Thing that is exceptional. ;)
6# Unfortunately that results in a file called .pm, which may cause
7# problems on some filesystems.
8
9use strict;
10use warnings;
11
12use base qw(autodie::exception);
13
14sub stringify {
15 my ($this) = @_;
16
17 my $error = $this->SUPER::stringify;
18
19 return "QaghHommeyHeylIjmo':\n" . # Due to your apparent minor errors
20 "$error\n" .
21 "lujqu'"; # Epic fail
22
23
24}
25
261;
27
28__END__
29
30# The following was a really neat idea, but currently autodie
31# always pushes values in $! to format them, which loses the
32# Klingon translation.
33
34use Errno qw(:POSIX);
35use Scalar::Util qw(dualvar);
36
37my %translation_for = (
38 EPERM() => q{Dachaw'be'}, # You do not have permission
39 ENOENT() => q{De' vItu'laHbe'}, # I cannot find this information.
40);
41
42sub errno {
43 my ($this) = @_;
44
45 my $errno = int $this->SUPER::errno;
46
47 warn "In tlhIngan errno - $errno\n";
48
49 if ( my $tlhIngan = $translation_for{ $errno } ) {
50 return dualvar( $errno, $tlhIngan );
51 }
52
53 return $!;
54
55}
56
571;
58
59