Parent Directory
|
Revision Log
This commit was manufactured by cvs2svn to create branch 'rel-2-4-patches'.
1 ################################################################################ 2 # WeBWorK Online Homework Delivery System 3 # Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ 4 # $CVSHeader: webwork2/lib/WeBWorK/Cookie.pm,v 1.1 2006/06/29 21:10:52 sh002i Exp $ 5 # 6 # This program is free software; you can redistribute it and/or modify it under 7 # the terms of either: (a) the GNU General Public License as published by the 8 # Free Software Foundation; either version 2, or (at your option) any later 9 # version, or (b) the "Artistic License" which comes with this package. 10 # 11 # This program is distributed in the hope that it will be useful, but WITHOUT 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 # FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the 14 # Artistic License for more details. 15 ################################################################################ 16 17 package WeBWorK::Cookie; 18 19 =head1 NAME 20 21 WeBWorK::Cookie - inherit from either Apache::Cookie or Apache2::Cookie 22 depending on mod_perl version. 23 24 =head1 SYNOPSIS 25 26 Given C<$r>, a WeBWorK::Request object 27 28 my $cookie = new WeBWorK::Cookie 29 30 =cut 31 32 use strict; 33 use warnings; 34 35 use mod_perl; 36 use constant MP2 => ( exists $ENV{MOD_PERL_API_VERSION} and $ENV{MOD_PERL_API_VERSION} >= 2 ); 37 38 # This class inherits from Apache::Cookie under mod_perl and Apache2::Cookie under mod_perl2 39 BEGIN { 40 if (MP2) { 41 require Apache2::Cookie; 42 Apache2::Cookie->import; 43 push @WeBWorK::Cookie::ISA, "Apache2::Cookie"; 44 } else { 45 require Apache::Cookie; 46 Apache::Cookie->import; 47 push @WeBWorK::Cookie::ISA, "Apache::Cookie"; 48 } 49 } 50 51 1;
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |