Changeset 26538 for lang/perl/Acme-CryptPB
- Timestamp:
- 12/12/08 11:05:53 (4 years ago)
- Location:
- lang/perl/Acme-CryptPB/trunk
- Files:
-
- 5 modified
-
Build.PL (modified) (1 diff)
-
Changes (modified) (1 diff)
-
META.yml (modified) (3 diffs)
-
lib/Acme/CryptPB.pm (modified) (4 diffs)
-
t/01.10310.t (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Acme-CryptPB/trunk/Build.PL
r23218 r26538 6 6 module_name => 'Acme::CryptPB', 7 7 license => 'perl', 8 dist_author => 'Dai Okabayashi <bayashi@ perl.org>',8 dist_author => 'Dai Okabayashi <bayashi@cpan.org>', 9 9 dist_version_from => 'lib/Acme/CryptPB.pm', 10 10 requires => { 11 11 'Test::More' => 0, 12 12 'version' => 0, 13 'Carp' => 0, 13 14 }, 14 15 add_to_cleanup => [ 'Acme-CryptPB-*' ], -
lang/perl/Acme-CryptPB/trunk/Changes
r23564 r26538 1 1 Revision history for Acme-CryptPB 2 2 3 1.1.3 Fri Dec 12 11:00:00 2008 4 little fixed and added tests 5 3 6 1.1.2 Tue Nov 13 13:13:13 2008 4 7 fixed bug.(escape regexp in CryptPB.pm) -
lang/perl/Acme-CryptPB/trunk/META.yml
r23564 r26538 1 1 --- 2 2 name: Acme-CryptPB 3 version: 1.1. 23 version: 1.1.3 4 4 author: 5 - 'Dai Okabayashi <bayashi@ perl.org>'5 - 'Dai Okabayashi <bayashi@cpan.org>' 6 6 abstract: For Pocket Bell Generation. 7 7 license: perl … … 9 9 license: http://dev.perl.org/licenses/ 10 10 requires: 11 Carp: 0 11 12 Test::More: 0 12 13 version: 0 … … 14 15 Acme::CryptPB: 15 16 file: lib/Acme/CryptPB.pm 16 version: 1.1. 217 version: 1.1.3 17 18 generated_by: Module::Build version 0.3 18 19 meta-spec: -
lang/perl/Acme-CryptPB/trunk/lib/Acme/CryptPB.pm
r23564 r26538 5 5 use utf8; 6 6 7 use Carp ;7 use Carp qw( croak ); 8 8 9 use version; our $VERSION = qv('1.1. 2');9 use version; our $VERSION = qv('1.1.3'); 10 10 11 11 my %PUN = ( … … 44 44 { 45 45 my $self = shift; 46 my $str = shift || return;46 my $str = shift; 47 47 48 48 return $str if $str !~ /[ァ-ンぁ-んヴ]/; 49 croak 'require utf8 flagged string' unless utf8::is_utf8($str);50 49 51 50 # hankaku katakana -> zenkaku katakana … … 81 80 { 82 81 my $self = shift; 83 my $char = shift || return;82 my $char = shift; 84 83 85 84 return $self->{pun}->{$char}; … … 148 147 =head1 AUTHOR 149 148 150 Copyright (c) 2008, Dai Okabayashi C<< <bayashi@ perl.org> >>149 Copyright (c) 2008, Dai Okabayashi C<< <bayashi@cpan.org> >> 151 150 152 151 -
lang/perl/Acme-CryptPB/trunk/t/01.10310.t
r23218 r26538 2 2 use utf8; 3 3 4 use Test::More tests => 1 2;4 use Test::More tests => 18; 5 5 6 6 use Acme::CryptPB; … … 8 8 my $pb = Acme::CryptPB->new(); 9 9 10 is($pb->get_pun('う'), '0', "get_pun hiragana"); 10 is($pb->get_pun(''), undef, "get_pun no string"); 11 is($pb->get_pun('う'), '0', "get_pun hiragana"); 11 12 is($pb->get_pun('ウ'), undef, "get_pun katakana"); 12 13 is($pb->get_pun('漢'), undef, "get_pun kanji"); 13 14 is($pb->get_pun('*'), undef, "get_pun kigou"); 15 16 is( 17 $pb->pbnize(''), 18 '', 19 "pbnize no string" 20 ); 21 22 is( 23 $pb->pbnize('This is test'), 24 'This is test', 25 "exclusive of HIRAGANA" 26 ); 27 28 my $str = 'おはよう'; 29 utf8::encode($str); 30 is( 31 $pb->pbnize($str), 32 $str, 33 "no flag string" 34 ); 14 35 15 36 is( … … 63 84 ); 64 85 86 eval { $pb->set_pun(''); }; 87 like($@, qr/set by hash ref!/, 'set_pun : not hash ref'); 65 88 89 eval { $pb->set_pun('hoge'); }; 90 like($@, qr/set by hash ref!/, 'set_pun : not hash ref 2'); 91
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)