-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved mobile related middlewares from core to middleware dirs
- Loading branch information
Showing
38 changed files
with
401 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
angelos-middlewares/Angelos-Middleware-MobileAgent/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
cover_db | ||
META.yml | ||
Makefile | ||
blib | ||
inc | ||
pm_to_blib | ||
MANIFEST | ||
Makefile.old | ||
tmon.out | ||
cover_db_view | ||
nytprof | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
steps = FindVersion, ChangeVersion, CheckChangeLog, DistTest, Commit, Tag, MakeDist, UploadCPAN | ||
git.tagpattern = release-%v | ||
git.push_to = origin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Revision history for Perl extension Angelos::Middleware::MobileAgent | ||
|
||
0.01 Sun Feb 1 00:31:53 2009 | ||
* original version |
21 changes: 21 additions & 0 deletions
21
angelos-middlewares/Angelos-Middleware-MobileAgent/MANIFEST.SKIP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
\bRCS\b | ||
\bCVS\b | ||
^MANIFEST\. | ||
^Makefile$ | ||
~$ | ||
^# | ||
\.old$ | ||
^blib/ | ||
^pm_to_blib | ||
^MakeMaker-\d | ||
\.gz$ | ||
\.cvsignore | ||
^t/9\d_.*\.t | ||
^t/perlcritic | ||
^xt/ | ||
^tools/ | ||
\.svn/ | ||
\.git/ | ||
^[^/]+\.yaml$ | ||
^[^/]+\.pl$ | ||
^\.shipit$ |
13 changes: 13 additions & 0 deletions
13
angelos-middlewares/Angelos-Middleware-MobileAgent/Makefile.PL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use inc::Module::Install; | ||
name 'Angelos-Middleware-MobileAgent'; | ||
all_from 'lib/Angelos/Middleware/MobileAgent.pm'; | ||
|
||
requires( | ||
'Angelos' => 0, | ||
'HTTP::MobileAgent' => 0, | ||
); | ||
|
||
build_requires 'Test::More'; | ||
use_test_base; | ||
auto_include; | ||
WriteAll; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
This is Perl module Angelos::Middleware::MobileAgent. | ||
|
||
INSTALLATION | ||
|
||
Angelos::Middleware::MobileAgent installation is straightforward. If your CPAN shell is set up, | ||
you should just be able to do | ||
|
||
% cpan Angelos::Middleware::MobileAgent | ||
|
||
Download it, unpack it, then build it as per the usual: | ||
|
||
% perl Makefile.PL | ||
% make && make test | ||
|
||
Then install it: | ||
|
||
% make install | ||
|
||
DOCUMENTATION | ||
|
||
Angelos::Middleware::MobileAgent documentation is available as in POD. So you can do: | ||
|
||
% perldoc Angelos::Middleware::MobileAgent | ||
|
||
to read the documentation online with your favorite pager. | ||
|
||
Takatoshi Kitano |
59 changes: 59 additions & 0 deletions
59
angelos-middlewares/Angelos-Middleware-MobileAgent/lib/Angelos/Middleware/MobileAgent.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package Angelos::Middleware::MobileAgent; | ||
use HTTP::Engine::Middleware; | ||
use HTTP::MobileAgent; | ||
|
||
BEGIN { | ||
## no critic. | ||
sub HTTP::MobileAgent::can_display_utf8 { | ||
my $self = shift; | ||
if ( $self->is_non_mobile | ||
|| ( $self->is_vodafone && $self->is_type_3gc ) | ||
|| $self->xhtml_compliant ) | ||
{ | ||
return 1; | ||
} | ||
else { | ||
return 0; | ||
} | ||
} | ||
|
||
## no critic. | ||
sub HTTP::MobileAgent::encoding { | ||
my $self = shift; | ||
$self->can_display_utf8() ? 'utf-8' : 'cp932'; | ||
} | ||
} | ||
|
||
middleware_method 'mobile_attribute' => sub { | ||
my $self = shift; | ||
$self->{mobile_agent} ||= HTTP::MobileAgent->new( $self->headers ); | ||
}; | ||
|
||
__MIDDLEWARE__ | ||
|
||
__END__ | ||
=head1 NAME | ||
Angelos::Middleware::MobileAgent - | ||
=head1 SYNOPSIS | ||
use Angelos::Middleware::MobileAgent; | ||
=head1 DESCRIPTION | ||
Angelos::Middleware::MobileAgent is | ||
=head1 AUTHOR | ||
Takatoshi Kitano E<lt>kitano.tk@gmail.comE<gt> | ||
=head1 SEE ALSO | ||
=head1 LICENSE | ||
This library is free software; you can redistribute it and/or modify | ||
it under the same terms as Perl itself. | ||
=cut |
5 changes: 5 additions & 0 deletions
5
angelos-middlewares/Angelos-Middleware-MobileAgent/t/00_compile.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
use strict; | ||
use Test::More tests => 1; | ||
|
||
BEGIN { use_ok 'Angelos::Middleware::MobileAgent' } |
4 changes: 4 additions & 0 deletions
4
angelos-middlewares/Angelos-Middleware-MobileAgent/xt/extra/dependency.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
use Test::Dependencies | ||
exclude => [qw/Test::Dependencies Test::Base Test::Perl::Critic Angelos::Middleware::MobileAgent/], | ||
style => 'light'; | ||
ok_dependencies(); |
10 changes: 10 additions & 0 deletions
10
angelos-middlewares/Angelos-Middleware-MobileAgent/xt/extra/podspell.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
use Test::More; | ||
eval q{ use Test::Spelling }; | ||
plan skip_all => "Test::Spelling is not installed." if $@; | ||
add_stopwords(map { split /[\s\:\-]/ } <DATA>); | ||
$ENV{LANG} = 'C'; | ||
set_spell_cmd("aspell list"); | ||
all_pod_files_spelling_ok('lib'); | ||
__DATA__ | ||
Takatoshi Kitano | ||
Angelos::Middleware::MobileAgent |
5 changes: 5 additions & 0 deletions
5
angelos-middlewares/Angelos-Middleware-MobileAgent/xt/perlcritic.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
use strict; | ||
use Test::More; | ||
eval { use Test::Perl::Critic -profile => 'xt/perlcriticrc' }; | ||
plan skip_all => "Test::Perl::Critic is not installed." if $@; | ||
all_critic_ok('lib'); |
2 changes: 2 additions & 0 deletions
2
angelos-middlewares/Angelos-Middleware-MobileAgent/xt/perlcriticrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[TestingAndDebugging::ProhibitNoStrict] | ||
allow=refs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
use Test::More; | ||
eval "use Test::Pod 1.00"; | ||
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; | ||
all_pod_files_ok(); |
12 changes: 12 additions & 0 deletions
12
angelos-middlewares/Angelos-Middleware-MobileJP/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
cover_db | ||
META.yml | ||
Makefile | ||
blib | ||
inc | ||
pm_to_blib | ||
MANIFEST | ||
Makefile.old | ||
tmon.out | ||
cover_db_view | ||
nytprof | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
steps = FindVersion, ChangeVersion, CheckChangeLog, DistTest, Commit, Tag, MakeDist, UploadCPAN | ||
git.tagpattern = release-%v | ||
git.push_to = origin |
Oops, something went wrong.