| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Egg::Plugin::Charset::Shift_JIS; | 
| 2 |  |  |  |  |  |  | # | 
| 3 |  |  |  |  |  |  | # Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt> | 
| 4 |  |  |  |  |  |  | # | 
| 5 |  |  |  |  |  |  | # $Id: Shift_JIS.pm 337 2008-05-14 12:30:09Z lushe $ | 
| 6 |  |  |  |  |  |  | # | 
| 7 | 1 |  |  | 1 |  | 946 | use strict; | 
|  | 1 |  |  |  |  | 5 |  | 
|  | 1 |  |  |  |  | 75 |  | 
| 8 | 1 |  |  | 1 |  | 10 | use warnings; | 
|  | 1 |  |  |  |  | 4 |  | 
|  | 1 |  |  |  |  | 127 |  | 
| 9 | 1 |  |  | 1 |  | 10 | use Jcode; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 107 |  | 
| 10 | 1 |  |  | 1 |  | 8 | use base qw/Egg::Plugin::Charset/; | 
|  | 1 |  |  |  |  | 4 |  | 
|  | 1 |  |  |  |  | 479 |  | 
| 11 |  |  |  |  |  |  |  | 
| 12 |  |  |  |  |  |  | our $VERSION = '3.00'; | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | sub _setup { | 
| 15 | 0 |  |  | 0 |  |  | my($e)= @_; | 
| 16 | 0 |  |  |  |  |  | my $c= $e->config; | 
| 17 | 0 |  |  |  |  |  | $c->{content_language} = 'ja'; | 
| 18 | 0 |  |  |  |  |  | $c->{content_type}     = 'text/html'; | 
| 19 | 0 |  |  |  |  |  | $c->{charset_out}      = 'Shift_JIS'; | 
| 20 | 0 |  |  |  |  |  | $e->next::method; | 
| 21 |  |  |  |  |  |  | } | 
| 22 |  |  |  |  |  |  | sub _convert_output_body { | 
| 23 | 0 |  |  | 0 |  |  | my $e= shift; | 
| 24 | 0 |  | 0 |  |  |  | my $body= shift || return 0; | 
| 25 | 0 |  |  |  |  |  | $$body= Jcode->new($body)->sjis; | 
| 26 |  |  |  |  |  |  | } | 
| 27 |  |  |  |  |  |  |  | 
| 28 |  |  |  |  |  |  | 1; | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | __END__ | 
| 31 |  |  |  |  |  |  |  | 
| 32 |  |  |  |  |  |  | =head1 NAME | 
| 33 |  |  |  |  |  |  |  | 
| 34 |  |  |  |  |  |  | Egg::Plugin::Charset::Shift_JIS - Plugin to output contents with Shift_JIS. | 
| 35 |  |  |  |  |  |  |  | 
| 36 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 37 |  |  |  |  |  |  |  | 
| 38 |  |  |  |  |  |  | use Egg qw/ Charset::Shift_JIS /; | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | This plugin is a subclass of L<Egg::Plugin::Charset>. | 
| 43 |  |  |  |  |  |  |  | 
| 44 |  |  |  |  |  |  | Contents are output with Shift_JIS. | 
| 45 |  |  |  |  |  |  |  | 
| 46 |  |  |  |  |  |  | The conversion of the character-code is L<Jcode>. Has gone. | 
| 47 |  |  |  |  |  |  |  | 
| 48 |  |  |  |  |  |  | =head1 SEE ALSO | 
| 49 |  |  |  |  |  |  |  | 
| 50 |  |  |  |  |  |  | L<Egg::Release>, | 
| 51 |  |  |  |  |  |  | L<Egg::Plugin::Charset>, | 
| 52 |  |  |  |  |  |  |  | 
| 53 |  |  |  |  |  |  | =head1 AUTHOR | 
| 54 |  |  |  |  |  |  |  | 
| 55 |  |  |  |  |  |  | Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt> | 
| 56 |  |  |  |  |  |  |  | 
| 57 |  |  |  |  |  |  | =head1 COPYRIGHT AND LICENSE | 
| 58 |  |  |  |  |  |  |  | 
| 59 |  |  |  |  |  |  | Copyright (C) 2008 Bee Flag, Corp. E<lt>L<http://egg.bomcity.com/>E<gt>. | 
| 60 |  |  |  |  |  |  |  | 
| 61 |  |  |  |  |  |  | This library is free software; you can redistribute it and/or modify | 
| 62 |  |  |  |  |  |  | it under the same terms as Perl itself, either Perl version 5.8.6 or, | 
| 63 |  |  |  |  |  |  | at your option, any later version of Perl 5 you may have available. | 
| 64 |  |  |  |  |  |  |  | 
| 65 |  |  |  |  |  |  | =cut | 
| 66 |  |  |  |  |  |  |  |