HTTP/ClientDetect.pm

filter: Statementstmt 100% 10 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 13 / 13 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« HTTP/ClientDetect/Language.pm ↑ Summary
1 package HTTP::ClientDetect;
2  
3 1 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 =head1 NAME
8  
9 HTTP::ClientDetect - Detect language and location of an HTTP request
10  
11 =head1 VERSION
12  
13 Version 0.02
14  
15 =cut
16  
17 1 our $VERSION = '0.02';
18  
19  
20 =head1 SYNOPSIS
21  
22 use HTTP::ClientDetect::Location;
23 my $geo = HTTP::ClientDetect::Location->new(db => $dbfile);
24 my $country = $geo->request_country($request_object)
25  
26 use HTTP::ClientDetect::Language;
27 my $lang_detect = HTTP::ClientDetect::Language->new(server_default => "hr_HR");
28 my $lang = $lang_detect->language_short($request_object);
29  
30 =head1 DESCRIPTION
31  
32 This module by itself doesn't do nothing. You have to load one or more
33 of its children, as per synopsis.
34  
35 The object passed to the methods has to be an object which at least
36 has an C<header> method for the language detection, or C<address> or
37 C<remote_address> for the country detection. This should work with
38 L<Dancer::Request> and L<Catalyst::Request> objects.
39  
40  
41 =head1 AUTHOR
42  
43 Marco Pessotto, C<< <melmothx at gmail.com> >>
44  
45 =head1 BUGS
46  
47 Please report any bugs or feature requests to C<bug-interchange6-plugin-autodetect at rt.cpan.org>, or through
48 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTTP-ClientDetect>. I will be notified, and then you'll
49 automatically be notified of progress on your bug as I make changes.
50  
51  
52  
53  
54 =head1 SUPPORT
55  
56 You can find documentation for this module with the perldoc command.
57  
58 perldoc HTTP::ClientDetect
59  
60  
61 You can also look for information at:
62  
63 =over 4
64  
65 =item * RT: CPAN's request tracker (report bugs here)
66  
67 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTTP-ClientDetect>
68  
69 =item * AnnoCPAN: Annotated CPAN documentation
70  
71 L<http://annocpan.org/dist/HTTP-ClientDetect>
72  
73 =item * CPAN Ratings
74  
75 L<http://cpanratings.perl.org/d/HTTP-ClientDetect>
76  
77 =item * Search CPAN
78  
79 L<http://search.cpan.org/dist/HTTP-ClientDetect/>
80  
81 =back
82  
83  
84 =head1 ACKNOWLEDGEMENTS
85  
86  
87 =head1 LICENSE AND COPYRIGHT
88  
89 Copyright 2013 Marco Pessotto.
90  
91 This program is free software; you can redistribute it and/or modify it
92 under the terms of either: the GNU General Public License as published
93 by the Free Software Foundation; or the Artistic License.
94  
95 See L<http://dev.perl.org/licenses/> for more information.
96  
97  
98 =cut
99  
100 1 1; # End of HTTP::ClientDetect
« HTTP/ClientDetect/Language.pm ↑ Summary