line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catalyst::Plugin::Browser; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
1
|
|
|
1
|
|
913
|
$Catalyst::Plugin::Browser::AUTHORITY = 'cpan:FLORA'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
BEGIN { |
6
|
1
|
|
|
1
|
|
16
|
$Catalyst::Plugin::Browser::VERSION = '0.08'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
# ABSTRACT: DEPRECATED: Browser Detection |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
441
|
use Moose::Role; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use CatalystX::RoleApplicator (); |
12
|
|
|
|
|
|
|
use namespace::autoclean; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
after setup_finalize => sub { |
15
|
|
|
|
|
|
|
my ($app) = @_; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# yeah, i know. sue me. |
18
|
|
|
|
|
|
|
CatalystX::RoleApplicator->init_meta(for_class => $app); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
$app->apply_request_class_roles(qw/ |
21
|
|
|
|
|
|
|
Catalyst::TraitFor::Request::BrowserDetect |
22
|
|
|
|
|
|
|
/); |
23
|
|
|
|
|
|
|
}; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |
29
|
|
|
|
|
|
|
=pod |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=encoding utf-8 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Catalyst::Plugin::Browser - DEPRECATED: Browser Detection |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 SYNOPSIS |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
use Catalyst qw[Browser]; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
if ( $c->request->browser->windows && $c->request->browser->ie ) { |
42
|
|
|
|
|
|
|
# do something |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 DESCRIPTION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Extends your applications request class with browser detection. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 DEPRECATED |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This module should no longer be used in new applications. |
52
|
|
|
|
|
|
|
L<Catalyst::TraitFor::Request::BrowserDetect> is the replacement. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 METHODS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=over 4 |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=item browser |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Returns an instance of L<HTTP::BrowserDetect>, which lets you get |
61
|
|
|
|
|
|
|
information of the client's user agent. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=back |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 SEE ALSO |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
L<HTTP::BrowserDetect>, L<Catalyst::TraitFor::Request::BrowserDetect>, L<Catalyst::Request>. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 AUTHORS |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=over 4 |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=item * |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Christian Hansen <ch@ngmedia.com> |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=item * |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Marcus Ramberg <mramberg@cpan.org> |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=item * |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Florian Ragwitz <rafl@debian.org> |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=back |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
This software is copyright (c) 2010 by Christian Hansen. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
92
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=cut |
95
|
|
|
|
|
|
|
|