debian/0000755000000000000000000000000012226313325007165 5ustar debian/libhtml-mason-perl.README.Debian0000644000000000000000000001154012012527033014730 0ustar HTML::Mason Debian package ========================== All Mason documentation is available [1]on the Mason website. An introduction to Mason can be found in [2]Mason.html, and the Administrator's Manual in [3]Admin.html. 1. http://www.masonhq.com/docs/manual/ 2. http://www.masonhq.com/docs/manual/Mason.html 3. http://www.masonhq.com/docs/manual/Admin.html Some basic Mason examples can be found in the libhtml-mason-perl-doc package. Using HTML::Mason with mod_perl ------------------------------- The standard way to run Mason is with mod_perl. The references above provide detailed information about this configuration. The following information is extracted directly from the Administrator's Manual. Please refer to the manual for a more detailed explanation. The absolutely most minimal configuration looks like this: PerlModule HTML::Mason::ApacheHandler SetHandler perl-script PerlHandler HTML::Mason::ApacheHandler In practice, this is a bad idea, as you don't want Mason to try to process images or other binary files, nor do you want private (non-top-level) Mason components to be served to users. The recommended naming scheme is to use "normal" extensions for top-level components, adding an "m" prefix for private components. Here is a configuration that enforces this naming scheme: use HTML::Mason::ApacheHandler; use Apache2::Const -compile => qw(HTTP_NOT_FOUND); SetHandler perl-script PerlHandler HTML::Mason::ApacheHandler SetHandler perl-script PerlInitHandler Apache2::Const::HTTP_NOT_FOUND Using HTML::Mason with SpeedyCGI -------------------------------- While mod_perl is definitely the standard way to run Mason, it is also possible to run it in a CGI environment. This would be preferable, for example, in some shared hosting environments (as mod_perl runs everything under the same process), or when using a web server other than Apache. Standard CGI is prohibitavely expensive, but this can be mostly overcome by a persistent CGI framework, such as SpeedyCGI or FastCGI. SpeedyCGI is the simpler of the two, and is recommended unless you have other reasons to pursue FastCGI. First, you need to install speedy-cgi-perl. (Note that it is also possible to use libapache-mod-speedycgi, although this won't be covered here.) In httpd.conf, enable mod_actions and configure like this: Action html-mason /cgi-bin/speedycgi-handler.cgi AddHandler html-mason .html Or equivilantly: Action html-mason /cgi-bin/speedycgi-handler.cgi SetHandler html-mason Create /usr/lib/cgi-bin/speedycgi-handler.cgi like so: ==== #!/usr/bin/speedy # -*- perl -*- use HTML::Mason::CGIHandler; BEGIN { warn "Loading speedycgi-handler.cgi"; }; warn "Executing speedycgi-handler.cgi"; my $h = HTML::Mason::CGIHandler->new(data_dir => "/var/cache/mason"); $h->handle_request; ==== Obviously, you can take out the "warn" lines in real use, but for testing this will demonstrate that mason-handler.cgi itself is only loaded once. Remember that stopping Apache does not kill off the speedy_backend processes! It is also possible to run Mason via CGI entirely from .htaccess files in your public_html directory. The instructions to do so were contributed by a previous maintainer, Steve Haslam, in March 2004. They may be out of date, but are provided here as a starting point for those who are interested. # /home/shaslam/public_html/mason_test/.htaccess: RewriteEngine On RewriteBase /~shaslam/mason_test/ RewriteRule ^mason_example_cgi/$ /~shaslam/mason_test/speedycgi_handler.cgi/mason_example/index.html RewriteRule ^mason_example_cgi/(.+)/$ /~shaslam/mason_test/speedycgi_handler.cgi/mason_example/$1/index.html RewriteRule ^mason_example_cgi/(.+) /~shaslam/mason_test/speedycgi_handler.cgi/mason_example/$1 Options +ExecCGI AddHandler cgi-script .cgi And speedycgi_handler.cgi must specify 'comp_root => "/home/shaslam/public_html/mason_test"' when constructing the CGIHandler object. The fiddling to rewrite requests to /index.html is not necessary if your URIs really do map to the mason components, because then mod_dir will do it. OTOH, you need to avoid rewriting requests ending in / in that case. Something like: RewriteRule ^mason_example_cgi/(.*[^/]) /~shaslam/mason_test/speedycgi_handler.cgi/mason_example/$1 And then, assuming "mason_example_cgi" is a directory with the components under it, requests ending in "/" will *not* be rewritten, so mod_dir will pick them up and look for "index.html" (DirectoryIndex setting) locations as usual. In general, this fiddling is not fun for novices. -- Charles Fry , Fri, 17 Jun 2005 01:21:57 -0400 debian/patches/0000755000000000000000000000000012150174777010630 5ustar debian/patches/02_cgihandler.patch0000644000000000000000000000101712150174772014244 0ustar Description: mimic mod_perl behaviour in HTML::Mason::CGIHandler Origin: vendor Last-Update: 2011-07-09 --- a/lib/HTML/Mason/CGIHandler.pm +++ b/lib/HTML/Mason/CGIHandler.pm @@ -97,6 +97,9 @@ $sent_headers = 1; } + # mimic mod_perl behaviour + use bytes; + # We could perhaps install a new, faster out_method here that # wouldn't have to keep checking whether headers have been # sent and what the $r->method is. That would require debian/patches/series0000644000000000000000000000005312012523403012020 0ustar 01_apachehandler.patch 02_cgihandler.patch debian/patches/01_apachehandler.patch0000644000000000000000000000307012150174777014730 0ustar Description: fix $VERSION handling; use /var/cache/mason as default data_dir Origin: vendor Last-Update: 2011-07-09 --- a/lib/HTML/Mason/ApacheHandler.pm +++ b/lib/HTML/Mason/ApacheHandler.pm @@ -9,9 +9,6 @@ package HTML::Mason::ApacheHandler; -use vars qw($VERSION); -# do not change the version number -$VERSION = 1.69; # PerlAddVar was introduced in mod_perl-1.24 @@ -27,7 +24,7 @@ require mod_perl; } - my $mpver = (mod_perl2->VERSION || mod_perl->VERSION || 0); + my $mpver = ($mod_perl2::VERSION || $mod_perl::VERSION || 0); # This is the version that introduced PerlAddVar if ($mpver && $mpver < 1.24) @@ -270,6 +267,11 @@ unless Apache::perl_hook('TableApi'); } +# CFRY: moved down from top of file in Debian (by a previous maintainer) +use vars qw($VERSION); +# do not change the version number +$VERSION = 1.69; + use base qw(HTML::Mason::Handler); BEGIN @@ -598,7 +600,11 @@ if (exists $allowed_params->{data_dir} and not exists $params{data_dir}) { # constructs path to /mason - if (UNIVERSAL::can('Apache2::ServerUtil','server_root')) { + # CFRY: use /var/cache/mason as default data_dir on Debian + if (-d '/var/cache/mason') { + $defaults{data_dir} = '/var/cache/mason'; + } + elsif (UNIVERSAL::can('Apache2::ServerUtil','server_root')) { $defaults{data_dir} = File::Spec->catdir(Apache2::ServerUtil::server_root(),'mason'); } else { $defaults{data_dir} = Apache->server_root_relative('mason'); debian/mason_example/0000755000000000000000000000000011671745124012026 5ustar debian/mason_example/show-cookies.html0000644000000000000000000000211711671745124015327 0ustar <%doc> This is actually more complicated than it needs to be. You could simply say: $cookies = UNIVERSAL::can("Apache::Cookie", "fetch") ? Apache::Cookie->fetch : CGI::Cookie->fetch; on the assumption that at least one method will work. Examining the value of $m->ah->args_method directory is ugly :)

Cookies

<%perl> my $cookies; my $loaded_cookies; if ($m->can("ah")) { if ($m->ah->args_method eq 'CGI') { $cookies = CGI::Cookie->fetch; $loaded_cookies = "mod_perl + CGI"; } elsif ($m->ah->args_method eq 'mod_perl') { $cookies = Apache::Cookie->fetch; $loaded_cookies = "mod_perl + Apache::Request"; } } elsif (UNIVERSAL::can("CGI::Cookie", "fetch")) { $cookies = CGI::Cookie->fetch; $loaded_cookies = "CGI"; } if ($loaded_cookies) {
    % foreach my $key (sort keys %$cookies) {
  • <% $key %>: <% $cookies->{$key}->as_string |h%> % }

Cookies loaded with <% $loaded_cookies |h%>

% } else {

Unable to figure out how to get cookies

% } <%attr> title => "Cookies" debian/mason_example/caller-stack.html0000644000000000000000000000041211671745124015256 0ustar

Called from <% $m->callers(1)->path %>

<& .content &> <%def .content> % for ($m->callers) { <% $_->title |h%> <% "$_" |h %> <% $_->can('owner') ? "owner=".$_->owner->name : "no_owner" |h%>
% } <%attr> title => "Caller stack" debian/mason_example/autohandler0000644000000000000000000000445411671745124014266 0ustar Mason: <% $title %>

<% $title %>

% if ($m->request_comp->source_file !~ m|/index.html$|) {

Back to index

% }
% $m->call_next;

Powered by Mason
<%init> my $next = $m->request_comp; # On mod_perl, $r->content_type contains Apache's (well, mod_mime's) idea of the content type if ($m->isa('HTML::Mason::Request::ApacheHandler')) { return $m->call_next if ($r->content_type eq 'text/css' || $next->attr_exists('no_autoheader')); } else { # Otherwise, use CGI variables and assumptions about file mapping to do this if ($ENV{REQUEST_URI} =~ /\.css/ || $next->attr_exists('no_autoheader')) { $r->content_type("text/css"); return $m->call_next; } } my $title = $next->attr_exists("title") ? $next->attr("title") : $ENV{REQUEST_URI}; $r->content_type("text/html; charset=utf-8"); <%def .negotiate_content> <%args> $accept %provide <%init> my $q = 1; my %accept_items; my %result_items; for my $el (split(/, */, $accept)) { my $item; if ($el =~ m/^(\S+); *q=([0-9.]+)/) { $item = $1; $q = $2; } else { $item = $el; } $accept_items{lc($item)} = $q; } for my $item (sort keys %provide) { if ($accept_items{$item}) { $result_items{$item} = $provide{$item}*$accept_items{$item}; } elsif ($accept_items{'*'}) { $result_items{$item} = $provide{$item}*$accept_items{'*'}; } } my @result = sort { $result_items{$b} <=> $result_items{$a} } keys %result_items; $r->log->debug("Chose '$result[0]' from '$accept'"); return $result[0]; debian/mason_example/lib/0000755000000000000000000000000011671745124012574 5ustar debian/mason_example/lib/dark.css0000644000000000000000000000034411671745124014230 0ustar body { background: #222222; color: white; font-size: 12 } div.outer { background: white; padding: 1px } div.component { background: #444444; padding: 4px } div.footer { font-weight: bold ; font-size: 10px } a { color: #ff8888 } debian/mason_example/lib/light.css0000644000000000000000000000025411671745124014416 0ustar body { font-size: 12 } div.outer { background: black; padding: 1px } div.component { background: #eeeeee; padding: 4px } div.footer { font-weight: bold ; font-size: 10px } debian/mason_example/lib/hourglass.png0000644000000000000000000000141011671745124015305 0ustar <%init> $r->content_type('image/png'); $m->print(MIME::Base64::decode_base64(< <%attr> no_autoheader => 1 <%once> use MIME::Base64; debian/mason_example/lib/hourglass.mhtml0000644000000000000000000000164711671745124015656 0ustar <%def .show>
align=center>
> % $m->flush_buffer; <%args> $id <%init> my $cid = "${id}_content"; <%def .hide>
% $m->flush_buffer; <%args> $id <%init> my $cid = "${id}_content"; <%init> $id =~ s/[^A-Za-z0-9]+/_/g; if ($op eq 'show') { return $m->comp(".show", id => $id); } elsif ($op eq 'hide') { return $m->comp(".hide", id => $id); } else { die "\"\$op\" argument to hourglass.m must be \"show\" or \"hide\"\n"; } <%args> $op $id => "hourglass$ENV{UNIQUE_ID}" debian/mason_example/show-headers.html0000644000000000000000000000154611671745124015313 0ustar

Headers in

    % foreach my $key (grep { defined($r->headers_in->{$_}) } sort keys %{$r->headers_in}) {
  • <% $key %>: <% $r->headers_in->{$key} |h%> % }

Headers out

    % foreach my $key (sort keys %{$r->headers_out}) {
  • <% $key %>: <% $r->headers_out->{$key} |h%> % }

Headers out (error responses)

    % foreach my $key (sort keys %{$r->err_headers_out}) {
  • <% $key %>: <% $r->err_headers_out->{$key} |h%> % }

Request notes

    % foreach my $key (sort keys %{$r->notes}) {
  • <% $key %>: <% $r->notes->{$key} |h%> % }

Subprocess environment

    % foreach my $key (sort keys %{$r->subprocess_env}) {
  • <% $key %>: <% $r->subprocess_env->{$key} |h%> % }
<%attr> title => "HTTP headers in/out, Request notes, Environment" debian/mason_example/test.html0000644000000000000000000000031511671745124013672 0ustar

This is a test

% if ($r->can('uri')) {

uri (from mod_perl) = <%$ENV{REQUEST_URI}%>

% } else {

uri (from CGI env) = <%$ENV{REQUEST_URI}%>

% } <%attr> title => "A test" debian/mason_example/index.html0000644000000000000000000000151111671745124014021 0ustar <& lib/hourglass.mhtml, op => "show" &> % my $dir = $m->current_comp->source_dir; % opendir(DIR, $dir) or die "Unable to read directory \"$dir\": $!\n"; % for my $filename (sort readdir(DIR)) { % next if ($filename =~ /^\./ || $filename =~ /~$/ || $filename =~ /^(index.html|lib|autohandler)$/); % my $entry = $m->fetch_comp($filename) or next; % next if ($entry->attr_exists('requires_mod_perl') && !$ENV{MOD_PERL});
  • <%$filename%> <% $entry->attr_exists("title") ? $entry->attr("title") : "" |h%> % } % closedir(DIR);
  • <& lib/hourglass.mhtml, op => "hide" &> <%attr> title => "Index" <%init> # Let's try and make the show-cookies demo interesting $r->headers_out->{"Set-Cookie"} = "ExampleCookie=This_is_an_example_cookie" unless ($r->headers_in->{Cookie}); debian/mason_example/show-env.html0000644000000000000000000000025611671745124014465 0ustar

    Current Environment

      % foreach my $key (sort(keys(%ENV))) {
    • <% $key %>: <% $ENV{$key} %> % }
    <%attr> title => "Environment variables" debian/mason_example/busy.html0000644000000000000000000000045311671745124013700 0ustar %# -*- perl -*- <& lib/hourglass.mhtml, op => "show" &> % for my $i (1..5) {

    (<%$i%>) This is some content that takes a while to produce

    % sleep(1); % } <& lib/hourglass.mhtml, op => "hide" &> <%attr> title => "Hourglass demonstration" requires_mod_perl => 1 debian/mason_example/i18ntest.html0000644000000000000000000000035611671745124014377 0ustar

    £ €

    ja: ユニバーサルオペレーティングシステム

    ru: Универсальная Операционная Система

    zh-TW: 環球作業系統

    <%attr> title => "i18n Test" debian/watch0000644000000000000000000000016012101264372010212 0ustar version=3 https://metacpan.org/release/HTML-Mason/ .*/HTML-Mason-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ debian/copyright0000644000000000000000000000301212226313325011114 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Source: https://metacpan.org/release/HTML-Mason Upstream-Contact: Jonathan Swartz Upstream-Name: HTML-Mason Files: * Copyright: 2012, Jonathan Swartz License: Artistic or GPL-1+ Files: debian/* Copyright: 1999, 2000, 2001, Michael Alan Dorman 1999, Craig Sanders 2001, 2002, 2003, 2004, Steve Haslam 2003, 2004, Marc Brockschmidt 2005, 2006, Charles Fry 2006, 2007, 2008, Charles Fry 2008, Peter Eisentraut 2009, 2010, 2011, Ivan Kohler 2011, gregor herrmann 2011-2013, Florian Schlichting 2013, Xavier Guimard License: Artistic or GPL-1+ License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1'. debian/libhtml-mason-perl.install0000644000000000000000000000010412012773735014266 0ustar usr/share debian/ApacheUserDirHandler.pm usr/share/perl5/HTML/Mason debian/control0000644000000000000000000000544312226313325010576 0ustar Source: libhtml-mason-perl Maintainer: Debian Perl Group Uploaders: Ivan Kohler , gregor herrmann , Florian Schlichting , Xavier Guimard Section: perl Priority: optional Build-Depends: debhelper (>= 8) Build-Depends-Indep: libapache2-mod-perl2, libcache-cache-perl, libchi-perl, libclass-container-perl, libexception-class-perl, libhtml-parser-perl, liblog-any-perl, libparams-validate-perl, libtest-deep-perl, libtest-memory-cycle-perl, libtest-pod-perl, perl Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libhtml-mason-perl.git Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libhtml-mason-perl.git Homepage: http://www.masonhq.com/ Package: libhtml-mason-perl Architecture: all Depends: ${misc:Depends}, ${perl:Depends}, libcache-cache-perl, libclass-container-perl, libexception-class-perl, libhtml-parser-perl, liblog-any-perl, libparams-validate-perl Recommends: libapache2-mod-perl2 Suggests: libchi-perl, libfcgi-perl, libhtml-mason-perl-doc Description: HTML::Mason Perl module Mason allows web pages and sites to be constructed from shared, reusable building blocks called components. Components contain a mix of Perl and HTML, and can call each other and pass values back and forth like subroutines. Components increase modularity and eliminate repetitive work: common design elements (headers, footers, menus, logos) can be extracted into their own components where they need be changed only once to affect the whole site. . Other Mason features include a graphical site previewing utility, an HTML/data caching model, and the ability to walk through requests with the Perl debugger. Package: libhtml-mason-perl-doc Architecture: all Section: doc Priority: extra Depends: ${misc:Depends} Conflicts: libhtml-mason-perl-examples Replaces: libhtml-mason-perl-examples Description: HTML::Mason examples Mason allows web pages and sites to be constructed from shared, reusable building blocks called components. Components contain a mix of Perl and HTML, and can call each other and pass values back and forth like subroutines. Components increase modularity and eliminate repetitive work: common design elements (headers, footers, menus, logos) can be extracted into their own components where they need be changed only once to affect the whole site. . This package contains the HTML::Mason examples. debian/libhtml-mason-perl.docs0000644000000000000000000000003011671745124013547 0ustar README CREDITS UPGRADE debian/mason_example.cgi0000644000000000000000000000034211671745124012511 0ustar #!/usr/bin/perl -w # to use SpeedyCGI, change first line to: #!/usr/bin/speedy use HTML::Mason::CGIHandler; use CGI; use CGI::Cookie; my $h = HTML::Mason::CGIHandler->new(data_dir => "/var/cache/mason"); $h->handle_request; debian/compat0000644000000000000000000000000212150174311010357 0ustar 8 debian/changelog0000644000000000000000000005213512226313325011045 0ustar libhtml-mason-perl (1:1.52-1) unstable; urgency=low * Imported Upstream version 1.52 (Closes: #574513) * Change upstream contact to Jonathan Swartz * Add myself to uploaders * Add libhtml-parser-perl also into build-dependencies -- Xavier Guimard Sat, 12 Oct 2013 07:23:35 +0200 libhtml-mason-perl (1:1.51-1) unstable; urgency=low [ Salvatore Bonaccorso ] * Change Vcs-Git to canonical URI (git://anonscm.debian.org) * Change search.cpan.org based URIs to metacpan.org based URIs [ gregor herrmann ] * debian/control: drop speedy-cgi-perl from Suggests. The package is going away soon. [ Florian Schlichting ] * Imported Upstream version 1.51 * Email change: Florian Schlichting -> fsfs@debian.org * Bumped Standards-Version to 3.9.4 (no change) * Add Description: header to patches -- Florian Schlichting Sat, 25 May 2013 20:06:46 +0200 libhtml-mason-perl (1:1.50-1) unstable; urgency=low * Imported Upstream version 1.50. * Bumped Standards-Version to 3.9.3 (use copyright-format 1.0). * Bumped copyright years. * Dropped 03_spelling.patch, applied upstream. * Removed packaging infrastructure for htdocs, which are no longer shipped by upstream. -- Florian Schlichting Tue, 14 Aug 2012 22:04:24 +0200 libhtml-mason-perl (1:1.48-1) unstable; urgency=low * Team upload. * Imported Upstream version 1.48 + Fix 'Unitialize value warnings when calling subcomponents' bug (Closes: #658260). -- Salvatore Bonaccorso Sat, 04 Feb 2012 15:44:12 +0100 libhtml-mason-perl (1:1.47-1) unstable; urgency=low * Imported Upstream version 1.47. * No longer install files to /var/www in postinst (Closes: #646209). * Merge libhtml-mason-perl-examples into libhtml-mason-perl-doc. -- Florian Schlichting Sun, 13 Nov 2011 02:08:11 +0000 libhtml-mason-perl (1:1.46-1) unstable; urgency=low [ Ansgar Burchardt ] * debian/control: Convert Vcs-* fields to Git. [ Salvatore Bonaccorso ] * debian/copyright: Replace DEP5 Format-Specification URL from svn.debian.org to anonscm.debian.org URL. [ Florian Schlichting ] * debian/mason_apache2_example.conf: Apply patch from BTS to work around an Apache2 bug preventing index.html to be shown when the URI specifies a directory (Closes: #451714). Thanks, Andreas Krueger! * Update README.Debian so that the sample config provided actually works with current versions of Apache (Closes: #537692). * Imported Upstream version 1.46 * Add myself to Uploaders. -- Florian Schlichting Thu, 29 Sep 2011 22:06:58 +0000 libhtml-mason-perl (1:1.45-1) unstable; urgency=low [ Ivan Kohler ] * Take over for the Debian Perl Group * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser field (source stanza). Changed: Maintainer set to Debian Perl Group (was: Ivan Kohler ); Ivan Kohler moved to Uploaders. * New upstream release + Fixes warnings under perl 5.12 (closes: Bug#615593) [ gregor herrmann ] * Fix watch file. * Switch to source format 3.0 (quilt). Remove quilt framework. * Bump debhelper to >= 8. Drop cdbs. * Refresh patches. * Add Danish debconf translation; thanks to Joe Dalton (closes: #605327). * Convert debian/copyright to DEP5 format. * Set Standards-Version to 3.9.2; remove version from perl build dependency. * debian/control: update build and runtime dependencies (remove unneeded versions and packages that are in perl core, add ${misc:Depends}, additional build dependencies and Suggests). * debian/rules: use /usr/share/cdbs/1/class/perl-makemaker.mk. * Use "set -e" in maintainer scripts. * Add /me to Uploaders. * Add a patch to fix some spelling mistakes. -- gregor herrmann Sat, 09 Jul 2011 14:26:12 +0200 libhtml-mason-perl (1:1.44-1) unstable; urgency=low * New upstream release + $m->flush_buffer is now ignored when inside $m->scomp or $m->content (closes: Bug#436507) -- Ivan Kohler Mon, 22 Mar 2010 13:06:04 -0700 libhtml-mason-perl (1:1.42-1) unstable; urgency=low * New upstream release (closes: Bug#541191) + Fixes segfault when using alter_superclass (closes: Bug#491483) + Fixes documentation quoting in Component.pm (closes: Bug#462324) * Russian po-debconf translation (Closes: #538652) * New maintainer. Huge thanks to Charles for his excellent work for many years. -- Ivan Kohler Wed, 12 Aug 2009 14:38:35 -0700 libhtml-mason-perl (1:1.39-1) unstable; urgency=low * New upstream release * Don't copy examples into inexistent /usr/lib/cgi-bin (Closes: #435607) -- Charles Fry Thu, 24 Jul 2008 13:22:58 -0400 libhtml-mason-perl (1:1.36-2.1) unstable; urgency=low * Non-maintainer upload. * Call realclean, to fix FTBFS if built twice in a row (Closes: #424512) * Added Homepage control field * Fixed doc-base section -- Peter Eisentraut Mon, 16 Jun 2008 13:59:34 +0200 libhtml-mason-perl (1:1.36-2) unstable; urgency=low * New dependency on libhtml-parser-perl (Closes: #434344) -- Charles Fry Tue, 24 Jul 2007 09:03:37 -0400 libhtml-mason-perl (1:1.36-1) unstable; urgency=low * New upstream release (Closes: #425937) * Removed build dependency on libapache-request-perl (Closes: #432499) * Portuguese translation for debconf messages (Closes: #418930) -- Charles Fry Thu, 12 Jul 2007 13:27:48 -0400 libhtml-mason-perl (1:1.35-3) unstable; urgency=low * Dutch po-debconf translation (Closes: #415516) * Conditional use of debconf in postrm (Closes: #416899) * Fixed encoding incompatibility between CGIHandler and ApacheHandler (Closes: #416606) -- Charles Fry Sat, 31 Mar 2007 08:11:03 -0400 libhtml-mason-perl (1:1.35-2) unstable; urgency=low * German po-debconf template translation (Closes: #400702) * Spanish po-debconf translation (Closes: #403518) -- Charles Fry Tue, 9 Jan 2007 13:03:27 -0500 libhtml-mason-perl (1:1.35-1) unstable; urgency=low * New upstream release -- Charles Fry Sat, 11 Nov 2006 11:38:20 -0500 libhtml-mason-perl (1:1.33-2) unstable; urgency=low * Move clean target dependencies to Build-Depends * Update to standards version 3.7.2 * New maintainer email address -- Charles Fry Wed, 5 Jul 2006 13:12:28 -0400 libhtml-mason-perl (1:1.33-1) unstable; urgency=low * New upstream release * ApacheUserDirHandler supports Apache2, thanks to Troy Davis and Derek W. Poon (Closes: #345405) -- Charles Fry Tue, 30 May 2006 10:44:03 -0400 libhtml-mason-perl (1:1.32-1) unstable; urgency=low * New upstream release -- Charles Fry Tue, 3 Jan 2006 15:35:32 -0500 libhtml-mason-perl (1:1.31.01-2) unstable; urgency=low * Swedish debconf templates translation, thanks to Daniel Nylander (Closes: #333135) -- Charles Fry Mon, 10 Oct 2005 12:21:48 -0400 libhtml-mason-perl (1:1.31.01-1) unstable; urgency=low * New upstream release -- Charles Fry Tue, 23 Aug 2005 16:24:49 -0400 libhtml-mason-perl (1:1.30-1) unstable; urgency=low * New upstream release * Initial Czech translation of debconf messages, thanks to Miroslav Kure (Closes: #316888) -- Charles Fry Mon, 1 Aug 2005 02:18:35 -0400 libhtml-mason-perl (1:1.29.02-1) unstable; urgency=low * New upstream release * Build-depends on libmodule-build-perl, and accompanying new build parameters (thanks to Brendan O'Dea) * New mod_perl doesn't have Apache2.pm, removed from sample config -- Charles Fry Fri, 24 Jun 2005 13:52:32 -0400 libhtml-mason-perl (1:1.28-2) unstable; urgency=low * Fixed 'Powered by Mason' image in example, thanks to Kim Hansen (Closes: #284592) * Rewrote README.Debian, integrating information on current best practices (Closes: #301225) * Changed file extensions in examples per current best practices (Closes: #301227) * Updated speedycgi-handler.cgi reference to point to examples package (Closes: #301224) * Removed dump-request example, as the new version of Mason breaks it, and a similar test is included in the docs package (Closes: #284615) * Moved custom scripts from examples to doc * Formatting changes in example configuration scripts -- Charles Fry Fri, 17 Jun 2005 15:59:02 -0400 libhtml-mason-perl (1:1.28-1) unstable; urgency=low * New maintainer (Closes: #312836) * New upstream release (Closes: #290224, #286811) * Added Vietnamese debconf translation, thanks to Clytie Siddall (Closes: #312235) * Added Japanese debconf translation, thanks to Hideki Yamane (Closes: #258779) * Don't create spurious /etc/apache, thanks to Jeff Bailey (Closes: #269093) * Moved /var/lib/mason to /var/cache/mason for FHS compliance (Closes: #291652) -- Charles Fry Wed, 15 Jun 2005 13:02:46 -0400 libhtml-mason-perl (1:1.26-1) unstable; urgency=low * New upstream release * apache-perl depends on libapache-mod-perl, so remove apache-perl from the Recommends field; no difference, just a simplification. * Debconf text updated, and translations correctly applied now. Thanks to Christian and Denis for their patience. -- Steve Haslam Wed, 7 Apr 2004 13:45:32 +0100 libhtml-mason-perl (1:1.25-6) unstable; urgency=low * Use invoke-rc.d instead of running apache*ctl directly (Closes: #241437) * Include French debconf translation (Closes: #238467) -- Steve Haslam Thu, 1 Apr 2004 18:54:55 +0100 libhtml-mason-perl (1:1.25-4) unstable; urgency=low * Ask libhtml-mason-perl/auto_restart_apache if the config fragment exists OR install_examples is true. So if the user says "no" to install_examples via dpkg-reconfigure to uninstall the examples, then they still get a chance to stop apache getting gracefulled again. * Use /var/lib/mason as the default data_dir setting as opposed to a server_root_relative path, provided /var/lib/mason exists. This aviods having to use a "mason" symlink in each of /etc/apache, /etc/apache-perl etc. * Correspondingly, remove the /etc/apache/mason symlink. * -examples: update postinst and config to look for apache-perl or apache-ssl being installed, and use their conf.d directories. This installs in *all* the apache1 variants found, if you have multiple variants installed, it could get excessive. (Closes: #236734) * -examples: Remove dependency on "apache", replace with recommendation of apache variants or apache2, and also recommend mod_perl (via apache-perl or a mod_perl DSO package) * -examples: Update postrm to remove our stuff from apache-perl etc. too * -examples: Also handle apache2, using a slightly different config file. This config file loads Apache::compat, which causes a performance hit. -- Steve Haslam Mon, 8 Mar 2004 12:38:03 +0000 libhtml-mason-perl (1:1.25-3) unstable; urgency=low * Separate out the manual into libhtml-mason-perl-doc and the examples into libhtml-mason-perl-examples. (Closes: #236230) * Remove the examples even if not being purged, otherwise we can leave the user with a broken mod_perl configuration. Also, with the examples being a separate package, this simply makes more sense. * dpkg-reconfigure libhtml-mason-perl-examples now installs/removes the examples, rather than having to remove the package. (Even if the examples are not "installed", they are still in /usr/share/doc/libhtml-mason-perl-examples/examples) * Restructured libhtml-mason-perl.README.Debian, which is now split between that file and libhtml-mason-perl-examples.README.Debian. Hopefully the documentation still makes sense. -- Steve Haslam Fri, 5 Mar 2004 13:40:41 +0000 libhtml-mason-perl (1:1.25-2) unstable; urgency=low * Move speedy-cgi-perl to Suggests * Looks like someone upstream rewrote the example httpd.conf (Closes: #231475) * Create /var/lib/mason as a directory owned by www-data. * Create /etc/apache/mason as a symlink to /var/lib/mason. So now the default MasonDataDir setting should work out-of-the-box. * Update my examples to include show-cookies (which can get cookies from CGI or Apache::Request), and to allow use of show-headers under pure CGI (which now works, due to use of FakeApache.pm) * Now automagically install examples for the user to peruse on the local Apache. Ask for permission first via debconf. (Closes: #68597) -- Steve Haslam Thu, 4 Mar 2004 18:25:46 +0000 libhtml-mason-perl (1:1.25-1) unstable; urgency=low * New upstream release (Closes: #229083) * Thanks for the patience from Marc Brockschmidt for: * Fixing typos in README (Closes: #197283) * Updating libexception-class-perl dependency (Closes: #202286, #213579) * Example httpd.conf missing ">" on line 22 (#231475, upstream) * FakeApache.pm is included in this upload (Closes: #231316) * Move debhelper Build-Depends to Build-Depends-Indep. -- Steve Haslam Mon, 9 Feb 2004 12:40:06 +0000 libhtml-mason-perl (1:1.21-1.2) unstable; urgency=low * Non-maintainer upload (yet another) * debian/control: Fix typo, now depend on the right version of libclass-exception-perl (1.10-1) (Closes: #202286) -- Marc Brockschmidt Wed, 21 Jan 2004 18:53:52 +0100 libhtml-mason-perl (1:1.21-1.1) unstable; urgency=low * Non-maintainer upload * Rebuild against new packages * Fixed failing tests 9-10 in t/04-misc.t (Closes: #213579) * debian/control: - Updated dependencies. (Closes: #202286) - Bumped Standards-Version to 3.6.1 - Moved debhelper to Build-Depends - Changed Section to perl * Fixed Typos in README.Debian (Closes: #197283) -- Marc Brockschmidt Sun, 14 Dec 2003 14:57:51 +0100 libhtml-mason-perl (1:1.21-1) unstable; urgency=low * New upstream version (Closes: #186678) * In fact, move the libapache-request-erpl|libapache2-mod-perl2 dependency into "Suggests", because really Mason doesn't *depend* on these Apache specifics. (Closes: #178597) -- Steve Haslam Sat, 7 Jun 2003 11:31:55 +0100 libhtml-mason-perl (1:1.17-2) unstable; urgency=low * Change dependency on libapache-request-perl to libapache-request-perl | libapache2-mod-perl2, which obvaites the need for libapache-request-perl (Closes: #196386) -- Steve Haslam Sat, 7 Jun 2003 10:43:29 +0100 libhtml-mason-perl (1:1.17-1) unstable; urgency=low * New upstream version * Add mason_example tree, updated README.Debian to use that as an example and also to show how to use SpeedyCGI. -- Steve Haslam Sun, 19 Jan 2003 03:26:16 +0000 libhtml-mason-perl (1:1.16-1) unstable; urgency=low * New upstream version (Closes: #176557) -- Steve Haslam Fri, 17 Jan 2003 12:41:40 +0000 libhtml-mason-perl (1:1.15-1) unstable; urgency=low * New upstream version -- Steve Haslam Tue, 15 Oct 2002 21:11:46 +0100 libhtml-mason-perl (1:1.14-1) unstable; urgency=low * New upstream version -- Steve Haslam Tue, 8 Oct 2002 10:30:53 +0100 libhtml-mason-perl (1:1.13-3) unstable; urgency=low * In HTML::Mason::ApacheUserDirHandler, customise in_package and apache_status_title for each user. * Added "use Apache::Log" in ApacheUserDirHandler -- Steve Haslam Fri, 4 Oct 2002 17:28:48 +0100 libhtml-mason-perl (1:1.13-2) unstable; urgency=low * Replace HTML::Mason::ApacheUserDirHandler, which got lost during updating to the new upstream version. -- Steve Haslam Mon, 16 Sep 2002 12:17:27 +0100 libhtml-mason-perl (1:1.13-1) unstable; urgency=low * debian/control: Fix Section: to match override file * New upstream version (Closes: #160746) -- Steve Haslam Fri, 13 Sep 2002 14:09:06 +0100 libhtml-mason-perl (1.1201-2) unstable; urgency=low * Wrote HTML::Mason::ApacheUserDirHandler package, and a README.Debian file giving some quick instructions on setting up Apache to work with HTML::Mason. -- Steve Haslam Mon, 9 Sep 2002 14:20:54 +0100 libhtml-mason-perl (1.1201-1) unstable; urgency=low * New upstream release -- Steve Haslam Mon, 12 Aug 2002 20:14:25 +0100 libhtml-mason-perl (1.05-1) unstable; urgency=low * Updated version while I sort out getting 1.201 installable -- Steve Haslam Fri, 2 Aug 2002 13:00:22 +0100 libhtml-mason-perl (1.04-1) unstable; urgency=low * New upstream release -- Steve Haslam Thu, 13 Dec 2001 19:32:54 +0000 libhtml-mason-perl (1.03-1) unstable; urgency=low * New upstream release -- Steve Haslam Mon, 4 Jun 2001 05:26:34 +0100 libhtml-mason-perl (1.02-1) unstable; urgency=low * New upstream release * New maintainer * Place Perl modules in /usr/share/perl5 for new Perl policy (closes #95508) -- Steve Haslam Fri, 18 May 2001 19:18:39 +0100 libhtml-mason-perl (0.896-1) unstable; urgency=low * New upstream release (closes: bug#83730) -- Michael Alan Dorman Sun, 28 Jan 2001 12:56:21 -0500 libhtml-mason-perl (0.89-1) unstable; urgency=low * New upstream release -- Michael Alan Dorman Fri, 15 Sep 2000 08:22:42 -0400 libhtml-mason-perl (0.88-1) unstable; urgency=low * New upstream release -- Michael Alan Dorman Thu, 31 Aug 2000 09:59:33 -0400 libhtml-mason-perl (0.87-2) unstable; urgency=low * Applied patch to correct whitespace issue (taken from message <0FW500MDRMK6NP@mta6.snfc21.pbi.net>) -- Michael Alan Dorman Fri, 16 Jun 2000 13:37:35 -0400 libhtml-mason-perl (0.87-1) unstable; urgency=low * New upstream release -- Michael Alan Dorman Wed, 31 May 2000 20:30:09 -0400 libhtml-mason-perl (0.86-1) unstable; urgency=low * New upstream version, reverse numerous patches. -- Michael Alan Dorman Fri, 19 May 2000 11:05:31 -0400 libhtml-mason-perl (0.85-3) unstable; urgency=low * Applied new parser patch, and another couple of small patches. -- Michael Alan Dorman Wed, 10 May 2000 15:25:12 -0400 libhtml-mason-perl (0.85-2) unstable; urgency=low * Applied patch for bug in new Parser code. -- Michael Alan Dorman Tue, 9 May 2000 12:38:05 -0400 libhtml-mason-perl (0.85-1) unstable; urgency=low * New upstream version, incorporates patches from last version. -- Michael Alan Dorman Mon, 8 May 2000 20:41:29 -0400 libhtml-mason-perl (0.81-2) unstable; urgency=low * Apply a patch for DeclineDirectory = 0. -- Michael Alan Dorman Sat, 18 Mar 2000 16:03:15 -0500 libhtml-mason-perl (0.81-1) unstable; urgency=low * New upstream version. -- Michael Alan Dorman Tue, 22 Feb 2000 13:05:42 -0500 libhtml-mason-perl (0.80-2) unstable; urgency=low * Applied a couple of minor patches from the mailing list. -- Michael Alan Dorman Thu, 27 Jan 2000 15:19:53 -0500 libhtml-mason-perl (0.80-1) unstable; urgency=low * New upstream version. -- Michael Alan Dorman Mon, 24 Jan 2000 09:38:41 -0500 libhtml-mason-perl (0.72-1) unstable; urgency=low * New upstream version. -- Michael Alan Dorman Tue, 19 Oct 1999 11:35:02 -0400 libhtml-mason-perl (0.71-1) unstable; urgency=low * New upstream version. * New maintainer. Thanks to Craig for getting this out there. -- Michael Alan Dorman Tue, 14 Sep 1999 18:59:37 -0400 libhtml-mason-perl (0.7-2) unstable; urgency=low * Fix for mc_suppress_http_header. * Fix for top_level_predicate. -- Michael Alan Dorman Fri, 3 Sep 1999 11:04:35 -0400 libhtml-mason-perl (0.7-1) unstable; urgency=low * New upstream release. Personal NMU. -- Michael Alan Dorman Thu, 2 Sep 1999 13:31:35 -0400 libhtml-mason-perl (0.6.1-1) unstable; urgency=low * New upstream release. Personal NMU. -- Michael Alan Dorman Thu, 29 Jul 1999 11:29:12 -0400 libhtml-mason-perl (0.6-1) unstable; urgency=low * New Upstream release * changed to use Storable by default rather than Data::Dumper * added Depends: libstorable-perl * moved Config.pm to /etc/Mason-Config.pm and symlinked * changed Depends: libapache-mod-perl to Suggests: * added Suggests: speedy-cgi-perl -- Craig Sanders Thu, 22 Jul 1999 09:06:15 +1000 libhtml-mason-perl (0.51-1) unstable; urgency=low * Initial Release -- Craig Sanders Mon, 5 Jul 1999 10:44:00 +1000 debian/libhtml-mason-perl-doc.README.Debian0000644000000000000000000000237311671745124015514 0ustar Enabling HTML::Mason examples ============================= This package provides an example configuration file, CGI handler and component tree. If you have Apache installed, these can be enabled to be visible at http://localhost/mason_example/index.html by following a few steps: - copy the mason_example directory to /var/www/ - copy mason_apache2_example.conf to /etc/apache2/conf.d/ If you're running under mod_perl (package libapache2-mod-perl2), reload Apache and you're done. To run as a CGI, you'll also need the following additional steps: - copy mason_example.cgi to /usr/lib/cgi-bin/ - make it executable with 'chmod +x /usr/lib/cgi-bin/mason_example.cgi' - enable mod_actions with 'a2enmod actions' - restart Apache with 'service apache restart' You should then be able to see the components at http://localhost/mason_example/index.html Note that the included server configuration files are intended to work in many different scenarios, and thus are not intended for general use. Further, they were created for an older version of Mason, and may not reflect current best practices. For instructions on configuring Mason for your webserver, please see the README.Debian in the main libhtml-mason-perl package, as well as the HTML::Mason::Admin manual. debian/libhtml-mason-perl.preinst0000644000000000000000000000053711671745124014317 0ustar #!/bin/bash set -e ##DEBHELPER## # Create mason data directory case "$1" in configure) webuser=www-data webgroup=www-data if [ "`getent passwd $webuser`" -a "`getent group $webgroup `" ]; then chown $webuser:$webgroup /var/cache/mason/cache /var/cache/mason/obj chmod 0700 /var/cache/mason/cache /var/cache/mason/obj fi ;; esac exit 0 debian/libhtml-mason-perl.postrm0000644000000000000000000000024711671745124014155 0ustar #!/bin/sh set -e case "$1" in purge) # Remove mason data directory rm -rf /var/cache/mason # and old symlink rm -f /var/lib/mason ;; esac ##DEBHELPER## exit 0 debian/masontest.html0000644000000000000000000000152511671745124012104 0ustar %# -- start test component-- you should not see this line output Mason test

    Mason test

    % if ($r->auth_type) {

    Hello, "<% $r->connection->user %>" (<% $r->auth_name %>)

    % } % for my $t (@$myvar) {

    <% $t %>

    % }

    This test compoent accessed <%$counter%> times so far

    <%$r->server->server_hostname%>:<%$r->server->port%>
    <%init> my $myvar = ["hello world", "welcome to the test mason component"]; # No, this is not a good example of how to implement a counter. my $counter = $m->cache->get("counter"); if (!$counter) { $m->cache->set("counter", $counter = 1, "1h"); } else { $m->cache->set("counter", ++$counter, "1h"); } %# -- end test component-- you should not see this line output debian/libhtml-mason-perl-doc.examples0000644000000000000000000000016111671745124015205 0ustar samples eg debian/mason_example debian/mason_example.cgi debian/mason_apache2_example.conf debian/masontest.html debian/source/0000755000000000000000000000000011671745124010476 5ustar debian/source/format0000644000000000000000000000001411671745124011704 0ustar 3.0 (quilt) debian/libhtml-mason-perl.dirs0000644000000000000000000000005212012526334013552 0ustar var/cache/mason/cache var/cache/mason/obj debian/rules0000755000000000000000000000003612150174311010240 0ustar #!/usr/bin/make -f %: dh $@ debian/mason_apache2_example.conf0000644000000000000000000000155111671745124014262 0ustar # This -*- Apache -*- configuration enables the example Mason components in /var/www/mason_example PerlModule CGI::Cookie SetHandler perl-script PerlResponsehandler HTML::Mason::ApacheHandler PerlSetVar MasonArgsMethod CGI # CGI was previously required for Mason to work in Apache2 # No mod_perl available, just use CGI # We still need mod_actions, try 'sudo a2enmod actions' if it doesn't work Action masonexample-handler /cgi-bin/mason_example.cgi SetHandler masonexample-handler # 2004-03-08 araqnid debian/libhtml-mason-perl.postinst0000644000000000000000000000137411671745124014516 0ustar #!/bin/bash set -e ##DEBHELPER## # Create mason data directory case "$1" in configure) webuser=www-data webgroup=www-data # move old /var/lib/mason to /var/cache/mason if [ -d /var/lib/mason -a ! -h /var/lib/mason ] then rm -rf /var/cache/mason mv -i /var/lib/mason /var/cache/mason ln -s /var/cache/mason /var/lib/mason if [ ! -d /var/cache/mason/cache ] then mkdir /var/cache/mason/cache fi if [ ! -d /var/cache/mason/obj ] then mkdir /var/cache/mason/obj fi fi # set permissions if [ "`getent passwd $webuser`" -a "`getent group $webgroup `" ] then chown $webuser:$webgroup /var/cache/mason/cache /var/cache/mason/obj chmod 0700 /var/cache/mason/cache /var/cache/mason/obj fi ;; esac exit 0 debian/ApacheUserDirHandler.pm0000644000000000000000000000677411671745124013527 0ustar # -*- perl -*- # Written by Steve Haslam. # Updated for Apache2 by Derek W. Poon. # All rights reserved. # This program is free software; you can redistribute it and/or modify it # under the same terms as Perl itself. # HTML::Mason::ApacheUserDirHandler # Run as a mod_perl request handler, create # HTML::Mason::ApacheHandler objects on demand to handle requests, # keying on the username from the URI. Keep the created ApacheHandler # objects in a cache. require 5; package HTML::Mason::ApacheUserDirHandler; use strict; use HTML::Mason::ApacheHandler; BEGIN { if (HTML::Mason::ApacheHandler::APACHE2) { require Apache2::Const; import Apache2::Const qw(DECLINED); require Apache2::Log; require Apache2::RequestUtil; } else { require Apache::Constants; import Apache::Constants qw(DECLINED); require Apache::Log; } } use vars qw(%userdir_handlers); sub handler { my $r = shift; my $apr = HTML::Mason::ApacheHandler::APACHE2 ? $r : Apache::Request->new($r); $apr->log->debug("Finding correct handler for ".$r->uri); if ($r->uri =~ m|^/~([a-zA-Z][a-zA-Z0-9_]*)/(.*)|) { my($username, $subpath) = ($1, $2); my $h = $userdir_handlers{$username}; if ($h) { if (ref($h)) { $apr->log->debug("Reusing $h for user \"$username\""); return $h->handle_request($r); } else { $apr->log->debug("Skipping previously bad username \"$username\" ($h)"); return DECLINED; } } $apr->log->debug("Trying to create new handler for \"$username\""); my ($u_name, $u_passwd, $u_uid, $u_gid, $u_quota, $u_comment, $u_gcos, $u_dir, $u_shell, $u_expire) = getpwnam($username); if (!$u_name) { $apr->log->error("User \"$username\" not found"); $userdir_handlers{$username} = "User not found"; return DECLINED; } if (!-d $u_dir) { $apr->log->error("User \"$username\" has non-existent home directory \"$u_dir\""); $userdir_handlers{$username} = "Home directory does not exist"; return DECLINED; } my $comp_root = "$u_dir/public_html"; if (!-d $comp_root) { $apr->log->error("User \"$username\": proposed component root $comp_root does not exist"); $userdir_handlers{$username} = "Proposed component root does not exist"; return DECLINED; } eval { my $spooldir = $r->dir_config('XMasonSpoolDir') || "/var/cache/mason"; my $spoolname = $username; # Vet $username here if we expand the regex to match it above my @args_method = defined $r->dir_config('MasonArgsMethod') ? (args_method => $r->dir_config('MasonArgsMethod')) : (); $h = HTML::Mason::ApacheHandler->new(data_dir => "$spooldir/$spoolname", comp_root => $comp_root, apache_status_title => "HTML::Mason status (for $username)", in_package => "HTML::Mason::UserDirCommands::$username", @args_method); }; if ($@) { my $err = $@; $apr->log->error("Failed to create Mason handler object: $err"); $userdir_handlers{$username} = $err; return DECLINED; } $apr->log->debug("New handler created as $h, chaining request"); $userdir_handlers{$username} = $h; return $h->handle_request($r); } else { $apr->log->debug("$r->uri does not look like a userdir URI, declining"); return DECLINED; } } __END__