Permalink
Browse files

new project poc

  • Loading branch information...
0 parents commit ad8654a5b9ce0eeb98e4cab430e25b6ae922c047 @patch patch committed Feb 11, 2012
Showing with 27 additions and 0 deletions.
  1. +27 −0 lib/Lingua/EO/Shavian.pm
@@ -0,0 +1,27 @@
+package Lingua::EO::Shavian;
+
+use strict;
+use warnings;
+use utf8;
+use parent 'Exporter';
+
+our @EXPORT = qw( to_shavian from_shavian );
+
+sub to_shavian {
+ my ($text) = @_;
+
+ $text =~ tr/ABCĈDEFGĜHĤIJĴKLMNOPRSŜTUŬVZ/𐑨𐑚𐑔𐑗𐑛𐑧𐑓𐑜𐑡𐑣𐑙𐑦𐑢𐑠𐑒𐑤𐑫𐑵𐑩𐑐𐑮𐑕𐑖𐑑𐑪𐑘𐑝𐑟/;
+ $text =~ tr/abcĉdefgĝhĥijĵklmnoprsŝtuŭvz/𐑨𐑚𐑔𐑗𐑛𐑧𐑓𐑜𐑡𐑣𐑙𐑦𐑢𐑠𐑒𐑤𐑫𐑵𐑩𐑐𐑮𐑕𐑖𐑑𐑪𐑘𐑝𐑟/;
+
+ return $text;
+}
+
+sub from_shavian {
+ my ($text) = @_;
+
+ $text =~ tr/𐑨𐑚𐑔𐑗𐑛𐑧𐑓𐑜𐑡𐑣𐑙𐑦𐑢𐑠𐑒𐑤𐑫𐑵𐑩𐑐𐑮𐑕𐑖𐑑𐑪𐑘𐑝𐑟/abcĉdefgĝhĥijĵklmnoprsŝtuŭvz/;
+
+ return $text;
+}
+
+1;

0 comments on commit ad8654a

Please sign in to comment.