~ubuntu-branches/debian/sid/libembperl-perl/sid

« back to all changes in this revision

Viewing changes to Embperl/Syntax/SSI.pm

  • Committer: Bazaar Package Importer
  • Author(s): Gunnar Wolf, Jonathan Yu, Damyan Ivanov, Ryan Niebur, gregor herrmann, Gunnar Wolf
  • Date: 2009-10-15 11:43:24 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20091015114324-2rnqzsj9jmpwd9nt
Tags: 2.3.0-1
[ Jonathan Yu ]
* New upstream release
  + SSI syntax now behaves more like mod_include
  + Improved XHTML/XML support
  + Fix to correctly retrieve Cookie header under apache2
  + Fix segfault when a value of an input attribute is removed
* Bringing this package under the pkg-perl group (Closes: #543609)
* Updated d/watch with CPAN search site
* Standards-Version 3.8.3
  + Remove version dependency on perl
  + Add Vcs-* and Homepage fields
* Drop version dependency on:
  + apache2-prefork-dev (>= 2.2.3-3.3) [oldstable 2.2.3-4]
  + apache2-mpm-prefork (>= 2.2.3-3.3) [oldstable  2.2.3-4]
  + libapache2-mod-perl2 (>= 2.0.2-2.3) [oldstable 2.0.2-2.4]
* Remove libcgi-pm-perl | perl-modules (>= 5.8.0) | libcgi-perl,
  which is always satisfied by perl
* Add extensive patches to fix POD errors and add whatis entries
* Add a patch to remove some Unicode data from POD; it was causing
  an obscure error with `AE' (thanks Ryan52!)

[ Damyan Ivanov ]
* debian/rules: fix target dependencies

[ Ryan Niebur ]
* Update jawnsy's email address
* Update ryan52's email address

[ gregor herrmann ]
* Split out all changes to upstream code into proper patches managed by
  quilt.
* Add patch cgi_pm.patch by Niko Tyni to avoid FTBFS if a newer CGI.pm is
  present at test time (closes: #521971).
* Update debian/copyright.
* debian/rules:
  - clean up a bit
  - call make with "-j1", the upstream build system is not parallel-build safe
  - add support for DEB_BUILD_OPTIONS nocheck
* Change Section to "perl".
* Remove dbinitembperlapache (created by test suite).

[ Gunnar Wolf ]
* Updated README.Debian to reflect the current reality re: thread
  safety, dropping mentions of obsolete mod_perl v1 and mentioning the
  deprecation of embperl itself
* Reload Apache if a2enmod/a2dismod was called in postinst/prerm
* Added Suggests: apache2-mpm-prefork, as it is the closer we can get to
  get the non-threaded versions of Apache2 by default besides
  documenting, which is already done in README.Debian. (Closes: #412521)

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
#   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
11
11
#   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12
12
#
13
 
#   $Id: SSI.pm 294756 2005-08-07 00:03:03Z richter $
 
13
#   $Id: SSI.pm 580573 2007-09-29 11:05:54Z richter $
14
14
#
15
15
###################################################################################
16
16
 
183
183
    $ENV{DATE_GMT}      = gmtime ;
184
184
    $ENV{DATE_LOCAL}    = localtime ;
185
185
    $ENV{DOCUMENT_NAME} = basename ($fn = $Embperl::req -> component -> sourcefile) ;
186
 
    $ENV{DOCUMENT_URI}  = $Embperl::req -> apache_req?$Embperl::req -> apache_req -> uri:'' ;
 
186
    $ENV{DOCUMENT_URI}  = $Embperl::req -> apache_req?$Embperl::req -> apache_req -> uri:$ENV{REQUEST_URI} ;
187
187
    $ENV{LAST_MODIFIED} = format_time('', (stat ($fn))[9]) ;
188
188
    }
189
189
     
194
194
#
195
195
# ---------------------------------------------------------------------------------
196
196
 
 
197
sub map_ssi_ops_to_perl
 
198
    {
 
199
    my $val = shift ;
 
200
 
 
201
    $val =~ s/\$(\w)([a-zA-Z0-9_]*)/\$ENV{'$1$2'}/g ;
 
202
    $val =~ s/\$\{(\w)([a-zA-Z0-9_]*?)\}/\$ENV{'$1$2'}/g ;
 
203
    $val =~ s,!=\s*/,!~ /,;
 
204
    $val =~ s,=\s*/,=~ /,;
 
205
    $val =~ s/!=/ne/;
 
206
    $val =~ s/=([^~])/eq$1/;    
 
207
 
 
208
    return $val ;
 
209
    }
197
210
 
198
211
sub InterpretVars
199
212
 
200
213
    {
201
214
    my $val = shift ;
202
215
    my $esc = shift ;
203
 
    $val =~ s/\$(\w)([a-zA-Z0-9_]*)/\$ENV{'$1$2'}/g ;
204
 
    $val =~ s/\$\{(\w)([a-zA-Z0-9_]*?)\}/\$ENV{'$1$2'}/g ;
 
216
    my @fields = ($val =~ m/\s* ("(?:(?!(?<!\\)").)*" | '(?:(?!(?<!\\)').)*' | \S+)/gx);
 
217
    $val = join(' ', map {m/^[\"\']/ ? $_ : map_ssi_ops_to_perl($_)} @fields );
205
218
    $val =~ s/\'/\\\'/g if ($esc) ;
206
219
    return $val ;
207
220
    }