blib/lib/CGI/Session/Plugin/Redirect.pm

filter: Statementstmt 61.5% 8 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 0.0% 0 / 1 totaltotal 58.8% 10 / 17 CC 1 SCAR 2.9
CC
1
Cov
62%
redirect
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
↑ Summary
1 package CGI::Session::Plugin::Redirect;
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 our $VERSION = '1.01';
5 0 ▶sub CGI::Session::redirect {
Subroutine redirect: not called CC=1 SCAR=6.9
Pod undocumented
6 0 my $session = shift;
7 0 my($url,$param) = split(/\?/,shift,2);
8 0 my $q = new CGI($param);
9 0 $q->param($session->name => $session->id);
10 0 return $q->redirect(-uri => "$url?".$q->query_string ,@_);
11 }
12 1 1;
13 =pod
14  
15 =head1 NAME
16  
17 CGI::Session::Plugin::redirect - extended redirect method for CGI::Session
18  
19 =head1 SYNOPSIS
20  
21 use CGI::Session;
22 use CGI::Session::Plugin::Redirect;
23 my $session = new CGI::Session();
24 print $session->redirect('http://exsample.com/redirect-path/');
25  
26 =head1 DESCRIPTION
27  
28 redirect() method is added to CGI::Session.
29  
30 =head1 AUTHOR
31  
32 Shin Honda (makoto[at]cpan.org,makoto[at]cpan.jp)
33  
34 =head1 copyright
35  
36 Copyright (c) 2006- Shin Honda. All rights reserved.
37 This program is free software; you can redistribute it and/or
38 modify it under the same terms as Perl itself.
39  
40 =head1 SEE ALSO
41  
42 L<CGI::Session>
43  
44 =cut
↑ Summary