use strict;
package SuikaWiki::Plugin::Registry;


our %Info;
$Info{q#TextRotate#}->{Name} = q#TextRotate#;
$Info{q#TextRotate#}->{q#Version#} = q#2004.0831.0328#;
$Info{q#TextRotate#}->{q#InterfaceVersion#} = q#2.9.1#;
$Info{q#TextRotate#}->{q#mkpluginVersion#} = q#2.1.19#;
$Info{q#TextRotate#}->{q#module_name#} = q#SuikaWiki::Plugin::plugin::TextRotate1040731032808Ndtk#;
$Info{q#TextRotate#}->{q#Date.RCS#} = q#$Date: 2010/05/16 23:05:49 $#;
$Info{q#TextRotate#}->{RequiredPlugin} = [q#WikiFormCore#];
$Info{q#TextRotate#}->{RequiredModule} = [q#Jcode#];
$Info{q#TextRotate#}->{Description} = [[q#TextRotate WikiPlugin module implements ROT 13 and TEN 25 (Juliuce
encryption for basic latin alphabet and kana.)#, q#en#, q##]];
$Info{q#TextRotate#}->{License} = [[q#%%Perl%%#, q##, q##]];
$Info{q#TextRotate#}->{Author} = [[[], [q##], [q##]]];

package SuikaWiki::Plugin::plugin::TextRotate1040731032808Ndtk;

$SuikaWiki::Plugin::Rule{form_template}->{rot} = {q#after#, sub {my ($f, $rule_name, $p, $o, %opt) = @_;

#line 1 "(WikiPlugin module source text-rotate.wp2, block FormattingRule[name()='[q#form-template#]/rot']/After)"
my $src = $p->{text}
|| $o->{wiki}->{input}->parameter ('wikiform__'.$p->{source});
$src = SuikaWiki::Plugin::plugin::TextRotate1040731032808Ndtk->rot13 ($src) unless $p->{rot13} && !$p->{rot13};
$src = SuikaWiki::Plugin::plugin::TextRotate1040731032808Ndtk->ten25 ($src) unless $p->{ten25} && !$p->{ten25};
$p->{-result} .= $src;}, q#Parameter#, {q#source#, {q#Type#, q#form-id#, q#Default#, q#(auto)#, q#Description#, [[q#Form field name from which source text to be encrypted
retrived.#, q#en#, q##]]}, q#text#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#Source text to be encrypted.  "source" parameter is referred
if missing.#, q#en#, q##]]}, q#rot13#, {q#Type#, q#boolean#, q#Default#, q#"1"#, q#Description#, [[q#Whether ROT 13 should be applied.#, q#en#, q##]]}, q#ten25#, {q#Type#, q#boolean#, q#Default#, q#"1"#, q#Description#, [[q#Whether TEN 25 should be applied.#, q#en#, q##]]}}, q#Description#, [[q#ROT 13 (for basic latin alphabet) + TEN 25 (for kana)#, q#en#, q##]]}
#line 1 "(WikiPlugin module TextRotate, chunk 1)"
;


sub ten25 {

#line 1 "(WikiPlugin module source text-rotate.wp2, block Function[Name='ten25']/Main)"
my (undef, $s) = @_;
my $tr_f = q{あいうえおかきくけこさしすせそたちつてとなにぬねの}
.q{はひふへほまみむめもやゝゆ〜よらりるれろわゐんゑを}
.q{アイウエオカキクケコサシスセソタチツテトナニヌネノ}
.q{ハヒフヘホマミムメモヤヽユーヨラリルレロワヰンヱヲ};
my $tr_t = q{はひふへほまみむめもやゝゆ〜よらりるれろわゐんゑを}
.q{あいうえおかきくけこさしすせそたちつてとなにぬねの}
.q{ハヒフヘホマミムメモヤヽユーヨラリルレロワヰンヱヲ}
.q{アイウエオカキクケコサシスセソタチツテトナニヌネノ};
require Jcode;
Jcode->new (\$s, 'euc')->tr ($tr_f => $tr_t);
$s;
}

#line 1 "(WikiPlugin module TextRotate, chunk 3)"



sub rot13 {

#line 1 "(WikiPlugin module source text-rotate.wp2, block Function[Name='rot13']/Main)"
my (undef, $s) = @_;
$s =~ tr/A-Za-z/N-ZA-Mn-za-m/;
$s;
}

#line 1 "(WikiPlugin module TextRotate, chunk 4)"

package SuikaWiki::Plugin::Registry;

$Info{q#TextRotate#}->{provide} = {q#rule#, {q#form_template#, [q#rot#]}};

1;
