HTTP/UserAgent.pm

filter: Statementstmt 62.5% 10 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 100% 2 / 2 totaltotal 65.2% 15 / 23 CC 1 SCAR 3.4
CC
1
Cov
62%
credentials
2.0
get_basic_credentials
2.0
BEGIN
1.0
CRAP 1.4
↑ Summary HTTP/Backend.pm »
1 package Catalyst::Plugin::Authentication::Store::HTTP::UserAgent;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use base qw/LWP::UserAgent/;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 0 ▶sub credentials {
Subroutine credentials: not called CC=1 SCAR=6.9
Pod documented
7 0 my ($self, $user, $pass) = @_;
8 0 @{ $self->{credentials} } = ($user, $pass);
9 }
10  
11 0 ▶sub get_basic_credentials {
Subroutine get_basic_credentials: not called CC=1 SCAR=6.9
Pod documented
12 0 my $self = shift;
13 0 return @{ $self->{credentials} };
14 }
15  
16 =head1 NAME
17  
18 Catalyst::Plugin::Authentication::Store::HTTP::UserAgent - Wrapper for LWP::UserAgent
19  
20 =head1 DESCRIPTION
21  
22 A thin wrapper for L<LWP::UserAgent> to make basic auth simpler.
23  
24 =head1 METHODS
25  
26 =head2 credentials
27  
28 now takes just a username and password
29  
30 =head2 get_basic_credentials
31  
32 Returns the set credentials, takes no options.
33  
34 =head1 AUTHOR
35  
36 Nigel Metheringham <nigelm@cpan.org> - integration into L<Catalyst::Plugin::Authentication::Store::HTTP>
37  
38 Marcus Ramberg <mramberg@cpan.org - original code in L<Catalyst::Plugin::Authentication::Credential::HTTP::User>
39  
40 =head1 LICENSE
41  
42 This module is free software; you can redistribute it and/or modify it
43 under the same terms as Perl itself.
44  
45 The full text of the license can be found in the LICENSE file included
46 with this module.
47  
48 =cut
49  
50 1 1;
↑ Summary HTTP/Backend.pm »