HTML-Mason
view release on metacpan or search on metacpan
[ BUG FIXES ]
- CGIHandler did not support $m->flush_buffer or autoflush. Reported
by Shane McCarron.
- Every line in the error stacktrace had a 'g' appended to it in HTML
error mode.
- The HTML error display of the stacktrace was not filtering out some
packages that it should have, so there were extra lines that made it
harder to find the real error.
- Several FakeApache methods were broken: path_info, uri, and
the_request. Reported by Matthias F. Brandstetter.
[ ENHANCEMENTS ]
- The CGIHandler request object now supports the autoflush parameter.
1.24 November 12, 2003
[ BUG FIXES ]
- Two tests in 04-misc.t, #9 and #10, failed if Params::Validate 0.66+
was installed. This happened because an error message given by
Params::Validate changed slightly, and was not a problem in the Mason
core code.
- The Component object method attr_if_exists returned 0 when the
attribute didn't exist, instead of undef as is documented. Reported
by Chris Reinhardt.
- The HTML::Mason::Resolver::File glob_path method, which is used for
the preloads feature, now uses File::Glob::bsd_glob when run with Perl
5.6.0+. This function properly handles spaces in filenames, which are
legal on most systems, and common on Win32. Implemented by Autrijus
Tang.
- The Admin guide erroneously said that the default component root
when running Mason outside a web environment was "/". It is the
current working directory. Reported by Patrick Kane.
1.23 September 8, 2003
[ ENHANCEMENTS ]
- Lots of enhancements to the Apache.pm emulation when using the
CGIHandler module. Implemented by David Wheeler.
- The fact that autohandlers or dhandlers can be turned off by setting
autohandler_name or dhandler_name to "" has now been documented, and
we explicitly check for this in the code. Task id #499.
- The ApacheHandler module now handles certain exceptions
(TopLevelNotFound, Abort, Decline) thrown from the Interp class's
make_request method by returning the desired error code. With the
default Mason Interp & Request classes, this will never happen.
However, subclasses may want to throw exceptions when constructing a
request. Implemented by David Wheeler.
[ BUG FIXES ]
- If any code type parameters were set in the httpd.conf file, Mason
died trying to read them. This bug was introduced in version 1.20.
Task id #496. Reported by David Wheeler.
- $m->caller, $m->callers and $m->caller_args now return undef or an
empty list instead of crashing when the specified stack level does not
exist. Task id #495. Reported by Bernhard Schmalhofer.
- The busy_lock option to $m->cache->get did not accept did not accept
string values for durations, like "4m". Task id #484. Reported by
Igor Muratov.
- When generating the HTML error message page, we now only use basic
HTML escaping. This fixes two problems. One is that if
HTML::Entities is not installed, using the "|h" escape flag in the
error display component causes an endless loop. The other is that the
"|h" flag can mangle non-Latin-1 characters. Task ids #497 and #494.
Reported by Harmen and Oleg Bartunov respectively.
- If a component generated output, then called another component via
$m->scomp, and that other component attempted to clear the buffer and
then abort, any output generated before the call to $m->scomp was
still sent to the client. This broke calling $m->redirect inside an
$m->scomp call. Task id #498. Reported by Kim Alexander Hansen.
1.22 July 14, 2003
[ ENHANCEMENTS ]
- Added $m->has_content to check for content without evaluating it.
- Comments are now allowed on separate lines inside <%attr> and
<%flags> blocks. Task id #475.
- $m->subexec and $m->make_subrequest now accept relative paths which
are interpreted relative to the current component directory, like
$m->comp.
- Documented potential problems if call to $m->redirect is trapped in
an eval block, and then output is generated before the exception is
rethrown. Task id #477.
[ BUG FIXES ]
- If a component with a filter section called abort, the filter was
run twice. Task id #473.
- If an exception was thrown when creating a request, memory was
leaked. This can happen when the top-level component cannot be
found (e.g. 404) or if there is an error in compiling the top-level
component. Task id #478. Reported by Doug Treder.
- Removed the use of alarm() and SIG{ALRM} to trap rare infinite loops
inside the compilation of components. It interfered with Mason
environments that use alarm() for their own purposes, and the
associated test would crash in certain Perl environments. If you find
that Mason sometimes enters an infinite loop, see the
"Hanging Processes: Detection and Diagnostics" section of the mod_perl
guide for hints on diagnosing the problem. Task id #472.
- Mason allowed a component to define two subcomponents or methods
with the same name. Task id #476. Reported by John Michael Mars.
1.21 June 4, 2003
[ INCOMPATIBLE CHANGES ]
- ** The semantics of @_ for components now match Perl subroutines: @_
contains aliases to the caller's arguments, instead of copies. For
example, if a component updates $_[0], the corresponding argument is
updated (or an error occurs if it is not updateable). The only users
that will notice this are those that update elements of @_ in
components and do not expect those changes to affect the caller. If
you have any doubts, grep your component tree for '\$_\[' and look for
assignment statements.
[ ENHANCEMENTS ]
by Kwindla Kramer.
- If a dhandler one subdirectory down (like /foo/dhandler) called
$m->decline, Mason threw a bogus exception. Fixed by Harmen.
- Running the test suite caused an error in the shell on Win32 with
newer versions of MakeMaker. Reported by Murat Unalan. (We _think_
this is fixed but we'd like confirmation from a Win32 user).
- It was not possible to set the data_cache_defaults parameter from
the httpd.conf file. Now it is.
- Mason was using Apache::Request->new instead of
Apache::Request->instance. This meant that if you had a handler that
ran earlier (like a TransHandler) and that handler created an
Apache::Request object, then the one Mason created would be missing
any POST arguments. Reported by Ray Zimmerman.
- Several different places in the docs said that Cache::Cache accepts
a username option, but there is no such thing.
- alter_superclass didn't work with CGIHandler because CGIHandler
didn't define a $VERSION variable. Reported by Nadine and Harry
Laxen.
- Made CGIHandler merge together POST and query string arguments in
order to be consistent with ApacheHandler. Reported by Nadine and Harry
Laxen.
- The CGIHandler module was overriding any out_method provided by the
user. Reported by Nadine and Harry Laxen.
1.15 October 14, 2002
[ BUG FIXES ]
- Fixed a number of problems with filters:
-- They didn't see changes made to %ARGS (they were seeing a copy).
-- They couldn't see any variables declared in <%args> blocks.
-- The presence of a filter caused a call to $m->flush_buffer,
breaking redirects.
- Added a number of tests for filters (*cough*).
- Fixed broken links and other bugs in the POD and HTML versions of
the docs.
- Fixed test failures when running as root. These failures were not
reflective of bugs in Mason, simply problems in the tests or test
setup. Now we skip the tests for end user installs (we still run them
during development, never fear).
- HTML::Mason::Request contained code that caused an error when using
the CPAN shell's "r" command.
1.14 October 7, 2002
[ BACKWARDS COMPATIBILITY ]
- Added compatibility layer for 1.0x cache API. It is now possible to
use $m->cache and $m->cache_self in the old way by setting the
data_cache_api parameter to '1.0'.
- Added back $comp->create_time, which was renamed as $comp->load_time
in 1.09_02, as a deprecated method.
- Added back $interp->time and $m->current_time, which were removed in
1.09_01, as deprecated methods.
[ ENHANCEMENTS ]
- Implemented the long requested user-defined escapes feature. It is
now possible to define your own escape flags, as well as overriding
Mason's own 'h' and 'u' flags.
- Implemented expire_if and busy_lock options in new $m->cache->get
API. These retain the essence of the 1.0x options although both
work a little differently.
- Added new module to implement caching extensions,
HTML::Mason::Cache::BaseCache, with accompanying documentation.
- Enhanced Params.pod with TOC and full descriptions of all
parameters. Standardized rest of documentation to link to Params.pod
when referring to a parameter.
- When a component path is not found, but that path matches a file on
disk, we now print an extra warning, because this indicates that the
user does not understand the distinction between component paths and
filesystem paths.
- The Request object's redirect() method now accepts an optional
additional argument, allowing users to use a status code other than
302 for the redirect.
- Mason should now work on a box with a fresh mod_perl 2/Apache 2
install. Previously, Mason unconditionally tried to load
Apache::Status, which comes with mod_perl 1.x, but not (yet?) with
mod_perl 2.
[ BUG FIXES ]
- Installation was failing when Exception::Class wasn't installed.
- Calling <%def> subcomponents no longer changes base_comp, which is
important in autohandlers. (reported by Ian Robertson)
- The documentation incorrectly indicated that you could create an
ApacheHandler object during server startup without providing a
component root. This will also shown incorrectly in the sample
handler.pl in the eg/ directory.
- Reduced Mason's memory usage when compiling and serving components.
This is particularly noticeable with very large components (1-2MB or
greater). Work on this will continue for future versions. (reported
by Todd Holbrook)
- %ARGS and <%shared> variables could not be accessed from <%filter>.
(reported by Adam Roth)
- Switch.pm did not work in file-based components. (reported by Gert
Thiel)
- use_strict could not be turned off. (reported by Viacheslav
Voytovich)
- $m->clear_buffer (and $m->redirect) did not work inside a component
call with content. (reported by Manuel Capinha)
- Some tests were failing on Windows, because they assumed Unix style
filesystem paths. This was a problem with the tests, not the core
code, but still worth fixing. (reported by Adam Rinehart).
- $m->caller() was inadvertently left out of the documentation - fixed.
- Fixed a small documentation error about what kinds of things are
valid keys in <%flags> and <%attr> blocks.
- Configuring multiple component roots via the httpd.conf file failed
silently (as opposed to releases 1.10 - 1.12, where this failed with
an error).
- Unreadable component source files caused the confusing error message
"source callback returned no source". This will now throw a much more
helpful exception.
- Errors occurring in subrequests would cause error output to be mixed
with regular output when the error_mode was "output" (the default with
ApacheHandler and CGIHandler). Errors in subrequests should now look
the same as errors in the top request.
1.13 August 26, 2002 (Taiwan time)
[ ENHANCEMENTS ]
- Replace the regex "[A-Za-z0-9]" with "\w", which should cooperate
better with Unicode.
- Added a section called "Avoiding Concurrent Recomputations" to the
Developer's Manual. This describes how to achieve the same effect as
was provided by the "busy locks" feature in 1.0x.
[ BUG FIXES ]
- When running under mod_perl, a warning was issued from
HTML::Mason::Request::ApacheHandler's exec() method. (reported by
Marius Feraru)
- The request wrapper code did not work with anonymous component.
(reported by Bob McElrath)
- Mason 1.10-1.12 did not cooperate with Apache::Filter, or any other
Apache subclass that overrode the print() method. (reported by Mark
Moseley)
- If an object blessed into Apache::Request was provided to
ApacheHandler's handle_request method, and you were using the
args_method parameter was set to "mod_perl" (the default), then
ApacheHandler would die. This was a bug introduced in 1.12 as a
result of fixing the memory leaks in 1.11. (reported by Autrijus
Tang)
- Configuring multiple component roots via the httpd.conf file failed.
(reported and patched by Alexei V. Barantsev)
- $interp->exec and $m->exec were not respecting wantarray. (reported
by David Bushong)
- Suppress a "subroutine redefined" warning from
HTML::Mason::Request::Apachehandler's exec() method. (reported by
Marius Feraru)
- Combining cache_self, <%filter> blocks, and $m->scomp did not work.
(reported by Calle Dybedahl)
- Tests 4 & 5 for 06-compiler.t would fail if HTML::Entities was not
installed. Now they will be skipped if necessary.
- Tests 75 & 99 for 08-ah.t depended on hash key ordering and would
fail with Perl 5.8.0. (submitted by Michael Gray)
- Fixed a number of cases where the lexer/compiler's behavior differed
from Mason 1.05 in unintended ways.
-- Dashes were not being allowed in subcomponent and method names,
even though this is documented as being allowed. (reported by Ken
Miller)
-- Space between a method or subcomponent name and the '>' at the end
of the tag was not being allowed. It should be noted that this is not
documented as being allowed in the docs, and so may change in the
future. But for now, we'd rather be compatible with 1.05. (reported
by Chris Hutchinson)
-- Comments were not being allowed after flag and attribute
assignments. Again, this is not documented as being allowed.
(reported by Chris Hutchinson)
- CPAN thought that version 1.68 of HTML::Mason::ApacheHandler (part
of the 1.05 release), was newer than version 1.242 (part of the 1.1201
release). This is what we get for using CVS to set verson numbers.
This version number is now set by hand in order to make sure that this
does not happen in the future.
1.1201 July 24, 2002
[ ENHANCEMENTS ]
- Added details to the UPGRADE document on what has changed with the
caching system.
- Added some documentation on how to arbitrarily expire items in the
cache with the new caching system. This is in HTML::Mason::Devel.
[ BUG FIXES ]
- Fixed a compilation error in HTML::Mason::Tools that was occurring
- Added index file to htdocs/
0.5.1 June 10, 1999
- Removed leftover "use File::Recurse" in ApacheHandler.pm [modus]
- Added empty test target to FAQ Makefile, required on certain
architectures [modus]
0.5 June 3, 1999
- Removed memory leak associated with "return sub { ... }"
- Overhauled Config.pm, now maintains previous configuration when
upgrading Mason (suggested by Patrick Kane)
- Made filename processing compatible with Windows 32 (suggested by
Rafael Weinstein)
- Removed requirement of File::Tools/File::Recurse, replaced with
standard File::Find
- Switched output to STDOUT from $r->print, to facilitate chaining
with other mod_perl tools
- Switched to standard argument processing code, now handles
multi-part forms [modus]
- New preprocess and postprocess Parser options allow you to apply
auomatic modifications to components, before or after they are compiled
into code. (submitted by Philip Gwyn)
- New in_package Parser option allows components to live in any
package. (submitted by Philip Gwyn)
- Added documentation about using globals in components, and
some new facilities: Parser option 'allow_globals' and Interp
method 'set_global'.
- Documented how to save persistent user information with Apache::Session [modus]
- ** Changed behavior of reload_file mode to read directly from object
files. If you use reload files, you're now responsible for
creating object files. [mschmick]
- Reduced number of file stats when loading components [mschmick]
- New apache_status_title ApacheHandler option makes it possible to
use Mason's perl-status page with multiple ApacheHandler objects.
(submitted by Philip Gwyn)
- Upgraded FakeApache/debug files to work with mod_perl 1.19
- New sections in Component Developer's Guide explain how debug files
work and some caveats about when they don't.
- Mentioned mailing lists, masonhq.com web site, and FAQ in the
documentation and README
- Improved documentation on how to integrate images and non-Mason
hierarchies with Mason.
- Differentiated mc_cache and mc_cache_self in the commands manual
(suggested by Tom Hukins)
- Increased discouraging of SDBM, improved warnings when cache store
fails (suggested by Patrick Kane)
- Fixed HTML documentation to work with IE (suggested by Fen Lebalme)
- Fixed infinite loop in ApacheHandler dhandler search (submitted by
Chuck O'Donnell)
- Documented Parser method parse(), which allows you to compile
components outside of a Interp environment.
- New mc_cache actions 'expire' and 'keys' help you peer into data cache
files and expire selected keys.
- Corrected Parser to properly handle \ in components (submitted by
Ken Williams)
- ** Took Preview out of Mason.pm; ApacheHandler used only if mod_perl
environment. If you use the previewer, you now have to explicitly "use
HTML::Mason::Preview" in your handler.pl.
- Improved documentation about argument/GET/POST handling (suggested
by Ken Williams)
- Added cache option 'busy_lock', which prevents multiple processes
from recomputing an expire cache value at the same time. (suggested
by Dennis Watson)
- Inserted work-around for Perl 5.005 $r scoping bug (submitted by
Rafael Weinstein)
- Fixed "new CGI" example in Components.pod (submitted by Austin Lin)
- Fixed "return if content-type..." line in handler.pl and Mason.pod
(submitted by Patrick Kane)
- Added CREDITS file
0.4 January 06, 1999
- Added support for using Perl profiler in conjunction with debug
files
- Fixed bug in previewer HTML trace introduced in 0.3
- Created Perl status section for Mason
- Removed most warnings when PerlWarn is on (suggested by Philip Gwyn)
- Added code_cache_mode parameter to control caching of components in
memory
- Fixed mismatch between documentation and code with regards to cache
store events in system log. The real event name is CACHE_WRITE.
- Changed system logging to use canonical server name when recording
URI
- Field access methods inside Mason objects are now handled with
custom subroutines instead of generic AUTOLOAD, improving performance
- Information for debug file is no longer collected if debug mode is
"none"
- Code to decline images and other non-text requests was placed in
default handler.pl and described in documentation (suggested by
Patrick Kane)
- Fixed server header output from debug files (suggested by Ewan Edwards)
- Created a Mason bundle
- Created a CPAN "alias" from Apache::Mason to HTML::Mason
0.3 November 25, 1998
- Added optional system logging of page requests, cache activity,
component loading
- Deny directory requests so that index files will work in mod_perl 1.16+
- Removed reliance on several external packages (Date::Manip,
CGI::Base, URI::Escape). This should reduce the amount of memory taken
up by Mason processes and make Mason easier to install.
- ** Due to the removal of Date::Manip, the mc_date command will no
longer work unless Date::Manip is explicitly used, and the syntax for
the expire_at cache parameter and the Interp current_time parameter
have changed.
- Added parser taint_check flag which allows Mason to work with taint
checking on (suggested by Randal Schwartz)
- Added warning messages when returning 404 from ApacheHandler
- Improved cache locking with the use of separate lock files
- Makefile.PL checks for required and optional packages
- Documentation fixes and improvements
- Removed obsolete and undocumented commands from Commands.pm
- Failure to write debug file is now a warning rather than fatal error
- Augmented "no configuration for previewer port" error
- Fixed $interp->exec to be able to return list
- Changed parser to remove ctrl-Ms instead of replacing with spaces
- Always call http_header hook, not just at top level
- Added global IN_DEBUG_FILE flag
- Renamed mc_call_stack to mc_comp_stack to match documentation
0.2 August 21, 1998
- Replaced File::lockf module, which could not port to some systems,
( run in 1.284 second using v1.01-cache-2.11-cpan-39bf76dae61 )