Revision 601

Date:
2016/10/21 17:13:15
Author:
ahitrov
Revision Log:
Get rid of CGI when possible. HTML::Mason most recent version.

Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/core/comps/contenido/components/cookies.msn

     
    4 4 $expires => undef
    5 5 </%args>
    6 6 <%init>
    7 if (defined $value)
    8 {
    9 my $cookie = new CGI::Cookie (
    7
    8 if (defined $value) {
    9 my $cookie = Apache::Cookie->new( $request->r(),
    10 10 -name => $name,
    11 11 -value => $value,
    12 12 defined $expires ? (-expires => $expires) : (),
    13 13 -secure => 0,
    14 14 );
    15 $r->headers_out->add('Set-cookie' => $cookie);
    16 }
    17 else
    18 {
    19 my %cookies = fetch CGI::Cookie;
    20 my $value = $cookies{$name}->value() if exists $cookies{$name} && $cookies{$name};
    21 return $value;
    22 }
    15 $cookie->bake();
    16 # $r->headers_out->add('Set-cookie' => $cookie);
    17 } else {
    18 my %cookies = Apache::Cookie->fetch;
    19 my $value = $cookies{$name}->value() if exists $cookies{$name} && $cookies{$name};
    20 return $value;
    21 }
    22
    23 23 </%init>
  • utf8/core/conf/mason/handler.pl.proto

     
    23 23 package HTML::Mason::Commands;
    24 24
    25 25 use Data::Dumper;
    26 use CGI::Cookie;
    27 26 use Convert::Cyrillic;
    28 27 use Image::Size;
    29 28 use Time::HiRes qw(gettimeofday);
  • utf8/core/lib/Utils.pm

     
    20 20 $VERSION = '0.1';
    21 21
    22 22 use Data::Dumper;
    23 use CGI;
    24 23 use locale;
    25 24 use File::Find;
    26 25 use Time::Local;
     
    116 115 %no_encode = map { $_ => 1; } @$no_urlencode if $no_urlencode ;
    117 116 }
    118 117
    119 my $one_param = sub { my ($k,$v)=@_; "$k=". ($no_encode{$k} ? $v : CGI::escape($v)) };
    118 my $one_param = sub { my ($k,$v)=@_; "$k=". ($no_encode{$k} ? $v : URI::Escape::uri_escape($v)) };
    120 119
    121 120 my $params = join('&',
    122 121 map { my $k=$_; ref ($Args{$k}) eq 'ARRAY' ? join('&', map { &$one_param($k, $_) } @{$Args{$k}}) : &$one_param($k, $Args{$k}) }
  • utf8/core/ports/all/HTML-Mason/GNUmakefile

     
    5 5
    6 6 #include ../../etc/perl.mk
    7 7
    8 PORTVERSION = 1.47
    8 PORTVERSION = 1.56
    9 9 MASTER_CPAN_SUBDIR = HTML
    10 PERL_MODBUILD = yes
    10 PERL_MAKEMAKER = yes
    11 11 PORT_DEPENDS = Params-Validate \
    12 12 Exception-Class \
    13 13 Log-Any \