| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Locale::Hebrew; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 2 |  |  | 2 |  | 14514 | use 5.005; | 
|  | 2 |  |  |  |  | 6 |  | 
|  | 2 |  |  |  |  | 70 |  | 
| 4 | 2 |  |  | 2 |  | 9 | use strict; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 64 |  | 
| 5 | 2 |  |  | 2 |  | 9 | use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 134 |  | 
| 6 | 2 |  |  | 2 |  | 8 | use Exporter; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 77 |  | 
| 7 | 2 |  |  | 2 |  | 9 | use DynaLoader; | 
|  | 2 |  |  |  |  | 2 |  | 
|  | 2 |  |  |  |  | 66 |  | 
| 8 | 2 |  |  | 2 |  | 1778 | use AutoLoader; | 
|  | 2 |  |  |  |  | 11882 |  | 
|  | 2 |  |  |  |  | 18 |  | 
| 9 |  |  |  |  |  |  |  | 
| 10 |  |  |  |  |  |  | @ISA = qw(Exporter DynaLoader); | 
| 11 |  |  |  |  |  |  | @EXPORT = @EXPORT_OK = qw(hebrewflip); | 
| 12 |  |  |  |  |  |  | $VERSION = '1.05'; | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | __PACKAGE__->bootstrap($VERSION); | 
| 15 |  |  |  |  |  |  |  | 
| 16 |  |  |  |  |  |  | =head1 NAME | 
| 17 |  |  |  |  |  |  |  | 
| 18 |  |  |  |  |  |  | Locale::Hebrew - Bidirectional Hebrew support | 
| 19 |  |  |  |  |  |  |  | 
| 20 |  |  |  |  |  |  | =head1 VERSION | 
| 21 |  |  |  |  |  |  |  | 
| 22 |  |  |  |  |  |  | This document describes version 1.05 of Locale::Hebrew, released | 
| 23 |  |  |  |  |  |  | May 27, 2010. | 
| 24 |  |  |  |  |  |  |  | 
| 25 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 26 |  |  |  |  |  |  |  | 
| 27 |  |  |  |  |  |  | use Locale::Hebrew; | 
| 28 |  |  |  |  |  |  | $visual = hebrewflip($logical); | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 31 |  |  |  |  |  |  |  | 
| 32 |  |  |  |  |  |  | This module is based on code from the Unicode Consortium. | 
| 33 |  |  |  |  |  |  |  | 
| 34 |  |  |  |  |  |  | The charset on their code was bogus, therefore this module had to work | 
| 35 |  |  |  |  |  |  | the real charset from scratch.  There might have some mistakes, though. | 
| 36 |  |  |  |  |  |  |  | 
| 37 |  |  |  |  |  |  | One function, C, is exported by default. | 
| 38 |  |  |  |  |  |  |  | 
| 39 |  |  |  |  |  |  | =head1 NOTES | 
| 40 |  |  |  |  |  |  |  | 
| 41 |  |  |  |  |  |  | The input string is assumed to be in C encoding by default. | 
| 42 |  |  |  |  |  |  |  | 
| 43 |  |  |  |  |  |  | On Perl version 5.8.1 and above, this module can handle Unicode strings | 
| 44 |  |  |  |  |  |  | by transparently encoding and decoding it as C.  The return | 
| 45 |  |  |  |  |  |  | value should still be a Unicode string. | 
| 46 |  |  |  |  |  |  |  | 
| 47 |  |  |  |  |  |  | =head1 SEE ALSO | 
| 48 |  |  |  |  |  |  |  | 
| 49 |  |  |  |  |  |  | L, which implements related algorithms based on the C library. | 
| 50 |  |  |  |  |  |  |  | 
| 51 |  |  |  |  |  |  | =cut | 
| 52 |  |  |  |  |  |  |  | 
| 53 |  |  |  |  |  |  | sub hebrewflip ($) { | 
| 54 | 2 | 100 | 66 | 2 | 0 | 706 | if ($] >= 5.008001 and utf8::is_utf8($_[0])) { | 
| 55 | 1 |  |  |  |  | 1285 | require Encode; | 
| 56 | 1 |  |  |  |  | 13017 | return Encode::decode( | 
| 57 |  |  |  |  |  |  | 'iso-8859-8', | 
| 58 |  |  |  |  |  |  | _hebrewflip( Encode::encode('iso-8859-8', $_[0]) ) | 
| 59 |  |  |  |  |  |  | ); | 
| 60 |  |  |  |  |  |  | } | 
| 61 | 1 |  |  |  |  | 36 | goto &_hebrewflip; | 
| 62 |  |  |  |  |  |  | } | 
| 63 |  |  |  |  |  |  |  | 
| 64 |  |  |  |  |  |  | 1; | 
| 65 |  |  |  |  |  |  |  | 
| 66 |  |  |  |  |  |  | =head1 ACKNOWLEDGMENTS | 
| 67 |  |  |  |  |  |  |  | 
| 68 |  |  |  |  |  |  | Lots of help from Raz Information Systems, L. | 
| 69 |  |  |  |  |  |  |  | 
| 70 |  |  |  |  |  |  | Thanks to Oded S. Resnik for suggesting Unicode support and exporting | 
| 71 |  |  |  |  |  |  | C by default. | 
| 72 |  |  |  |  |  |  |  | 
| 73 |  |  |  |  |  |  | =head1 AUTHORS | 
| 74 |  |  |  |  |  |  |  | 
| 75 |  |  |  |  |  |  | Audrey Tang Ecpan@audreyt.orgE | 
| 76 |  |  |  |  |  |  | is the current maintainer. | 
| 77 |  |  |  |  |  |  |  | 
| 78 |  |  |  |  |  |  | Ariel Brosh Eschop@cpan.orgE | 
| 79 |  |  |  |  |  |  | is the original author, now passed away. | 
| 80 |  |  |  |  |  |  |  | 
| 81 |  |  |  |  |  |  | =head1 COPYRIGHT | 
| 82 |  |  |  |  |  |  |  | 
| 83 |  |  |  |  |  |  | Copyright 2001, 2002 by Ariel Brosh. | 
| 84 |  |  |  |  |  |  |  | 
| 85 |  |  |  |  |  |  | Copyright 2003-2010 by Audrey Tang. | 
| 86 |  |  |  |  |  |  |  | 
| 87 |  |  |  |  |  |  | This program is free software; you can redistribute it and/or modify it | 
| 88 |  |  |  |  |  |  | under the same terms as Perl itself. | 
| 89 |  |  |  |  |  |  |  | 
| 90 |  |  |  |  |  |  | See L | 
| 91 |  |  |  |  |  |  |  | 
| 92 |  |  |  |  |  |  | =cut | 
| 93 |  |  |  |  |  |  |  | 
| 94 |  |  |  |  |  |  | __END__ |