blib/lib/OAuthomatic/OAuthInteraction/ViaMicroWeb.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 27 SCAR 6.9
CC
1
Cov
0%
prepare_to_work
2.0
cleanup_after_work
2.0
BEGIN
2.0
CRAP 2.0
1 package OAuthomatic::OAuthInteraction::ViaMicroWeb;
2 # ABSTRACT: Handling oauth callback via embedded web server
3  
4  
5  
6 use Moose;
7 use namespace::sweep;
8 use Proc::Background;
9 use Carp;
10  
11  
12 has 'micro_web' => (is=>'ro', isa=>'OAuthomatic::Internal::MicroWeb', required=>1,
13 handles => [ 'callback_url', 'wait_for_oauth_grant' ]);
14  
15 sub prepare_to_work {
16 my $self = shift;
17 $self->micro_web->start_using;
18 }
19  
20 sub cleanup_after_work {
21 my $self = shift;
22 $self->micro_web->finish_using;
23 }
24  
25 with 'OAuthomatic::OAuthInteraction';
26  
27 __END__
28  
29 =pod
30  
31 =encoding UTF-8
32  
33 =head1 NAME
34  
35 OAuthomatic::OAuthInteraction::ViaMicroWeb - Handling oauth callback via embedded web server
36  
37 =head1 VERSION
38  
39 version 0.01
40  
41 =head1 DESCRIPTION
42  
43 This module uses in-process web server to handle callback after OAuth permission
44 is granted. Used as default implementation of C<oauth_interaction> plugin
45 of L<OAuthomatic>.
46  
47 =head1 PARAMETERS
48  
49 =head2 micro_web
50  
51 Embedded web server object. Here it will be used to handle OAuth callback and display
52 minimal info to the user afterwards.
53  
54 =head1 AUTHOR
55  
56 Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
57  
58 =head1 COPYRIGHT AND LICENSE
59  
60 This software is copyright (c) 2015 by Marcin Kasperski.
61  
62 This is free software; you can redistribute it and/or modify it under
63 the same terms as the Perl 5 programming language system itself.
64  
65 =cut