ANNOUNCE: Mason 1.10 released (from: autarch@urth.org)

As a heads up, RT 2.0.x doesn’t currently work with HTML::Mason 1.10
They’ve changed some APIs and it’ll be a bit of work to get a version
that works with both mason 1.0.5 and 1.10. For now, please be
careful to install mason 1.05 with RT 2.0.x.

(The RT 2.1.x development series uses Mason 1.10 natively)

----- Forwarded message from Dave Rolsky autarch@urth.org -----

<mason-announce@lists.sourceforge.net>,
<mason-devel@lists.sourceforge.net>

List-Help: mailto:mason-users-request@lists.sourceforge.net?subject=help
List-Post: mailto:mason-users@lists.sourceforge.net
List-Subscribe: https://lists.sourceforge.net/lists/listinfo/mason-users,
mailto:mason-users-request@lists.sourceforge.net?subject=subscribe
List-Id: Main user’s list for Mason <mason-users.lists.sourceforge.net>
List-Unsubscribe: https://lists.sourceforge.net/lists/listinfo/mason-users,
mailto:mason-users-request@lists.sourceforge.net?subject=unsubscribe
List-Archive: http://www.geocrawler.com/redir-sf.php3?list=mason-users
X-Spam-Status: No, hits=1.1 required=5.0 tests=TO_LOCALPART_EQ_REAL,LINES_OF_YELLING version=2.20
X-Spam-Level: *

This is the announcement of Mason 1.10, a release approximately two years
or so in the month (give or take a few months).

As you might notice from the changelog below, there are a lot of
changes.

Among the highlights are:

  • Line numbers reported in errors are now from the component source file,
    not the compiled object file. This makes for much easier debugging.

  • New subrequest feature which allows a component to make a component call
    that goes through the autohandler and dhandler lookup process again.

  • New “components call with content” feature that allows you to pass Mason
    source to a component call, like this:

    <& translate, current_lang => $lang &>
    Hi there
    Ni3 hao3
    Bonjour
    </&>

  • Almost every class in Mason in easily replaceable with a customized
    subclass.

Check out the new HTML::Mason::Request::WithApacheSession module on CPAN
to see this in action. It integrates an Apache::Session object into the
Request object ($m->session) and is configurable via a handler.pl or the
httpd.conf file.

  • New CGIHandler module to make using Mason as easy with CGI as it is with
    mod_perl.

  • A new $m->redirect method available when using the ApacheHandler or
    CGIHandler modules.

While we’ve done a lot of testing, and have fixed all the reported bugs
from our two betas, we encourage you to consider this a “.0” release, and
to test it before putting it into production.

Also, please note that there are quite a number of backwards
incompatibilities in this release. Read the UPGRADE document to see a
list of such imcompatibilities, as well as guidelines for handling them.

Enjoy!

The Mason Team

Changes

1.10

This is a big release and there are a number of backwards
incompatibilities with version 1.05 and earlier. Please make sure to
read the UPGRADE document, which covers these in more detail.

[ ENHANCEMENTS ]

  • Mason can always detect when an object file was compiled with an
    incompatible compiler/lexer, even if the object file contains syntax
    errors.
  • Method and subcomponent blocks with no name (<%method>) were caught
    as an error, but the error message was very confusing. This has been
    fixed.
  • Added HTML::Mason::Subclassing, documentation on subclassing Mason
    objects.
  • Added documentation on the interaction between <%once> sections and
    preloading components.
  • Mason automatically calls $m->clear_buffer when $m->decline is
    called.

[ BUG FIXES ]

  • Fixed a bug in the lexer that made it think it had found a Perl-line
    where none existed.
  • Fixed a bug related to handling of parameters in httpd.conf files.
    This was only noticeable if you attempted to provide a subclass of one
    of Mason’s classes (like your own Request class) that took its own
    parameters. Mason was not recognizing those additional parameters as
    valid.
  • Improved line number reporting from earlier releases. Line numbers
    are now reported properly for errors in any type of block.

1.09_02 June 4, 2002

[ INCOMPATIBLE CHANGES ]

  • ** The Component class’s create_time method has been renamed as
    load_time.
  • ** Relative component paths in the $interp->exec() method are no
    longer resolved. All component paths must be absolute. Relative path
    resolution was added in 1.09_01 so this change is unlikely to affect
    most users.
  • ** Removed option to expire a component from the Apache::Status
    page. This option made little sense since components are cached
    per-process, and there’s no guarantee that any particular process has
    cached a given component. Again, this is a feature added in 1.09_01
    so this change should not cause most people any problems.
  • ** Renamed CGIHandler’s handle_cgi method to handle_comp.
  • ** Removed the dev_dirs feature from CGIHandler.
  • ** The default component root when not using ApacheHandler or
    CGIHandler is now the current working directory at the time the
    HTML::Mason::Resolver::File class is loaded.

[ ENHANCEMENTS ]

  • All the modules included with Mason are now documented.
  • Various pieces of existing documentation have been tweaked and
    modified.
  • Added handle_cgi_object method to CGIHandler.
  • Mason works with the CVS version of mod_perl 2.0 when mod_perl 2.0’s
    backwards compatibility layer is used. AFAICT, the CVS version is
    close enough to what will be released as 2.0 that few, if any, changes
    should be required once 2.0 is out.
  • When running Mason with the ApacheHandler or CGIHandler modules, the
    Mason request object ($m) now has a “redirect” method, which can be
    used to send an HTTP redirect to the client. L{Request/redirect}

[ BUG FIXES ]

  • $m->flush_buffer was sending out ‘’ to the buffer, even if no output
    existed. This caused ApacheHandler to send headers, which broke
    redirects, for example.
  • Fix broken Apache::Status page (reported by Thomas A. Lowery).
  • The lexing code now handles some weird edge case errors in a better
    way. One of these involved a component starting with a invalid block
    name like <%foo>.
  • A component that compiles into Perl code that causes syntax errors
    seems to trigger a Perl bug when Mason attempts to eval it. The
    symptom is that Mason simply hangs when it tries to eval the
    component’s object file. This bug is present in Perls before 5.7.3,
    but appears to be fixed in the development branch. Mason will use
    alarm, if supported by the system, to work around this.
  • Output from subrequests was appearing before other component
    output. The new default is that this output appears “inline” in the
    calling component, which we think is most DWIM-ish. Alternate
    behavior can be achieved by explicitly setting the subrequest’s
    out_method parameter.
  • The $r object provided by CGIHandler.pm was not passing header
    values to CGI.pm in a way that CGI.pm liked. Now we add a ‘-’ to the
    front of the header name if necessary, and all headers are canonized
    to lower case in order to avoid having duplicates.
  • Mason only requires Apache::Request if you have mod_perl installed
    already.

1.09_01 April 4, 2002

[ INCOMPATIBLE CHANGES ]

  • ** Errors now report line numbers from the component source file.
  • ** The Parser class has been removed entirely. Its functionality
    has been split between the Lexer and Compiler objects. L{Compiler}
  • ** The debug file feature has been removed.
  • ** The previewer has been removed.
  • ** The Interp use_reload_files parameter has been removed. The new
    static_source parameter provides a useful, and conceptually simpler,
    replacement. L{Interp/static_source}
  • ** Mason’s built in caching now uses Cache::Cache to do all the
    heavy lifting. This means that parameters for both the $m->cache and
    $m->cache_self methods have changed.
  • ** The ApacheHandler’s top_level_predicate parameter has been
    removed.
  • ** The mc_* commands have been removed entirely.
  • ** The Interp’s taint_check parameter has been removed. Mason now
    simply determines whether or not it is running in taint mode and acts
    appropriately without user intervention.
  • ** Mason now uses Apache::Request as its default argument processing
    module. You can explicitly use CGI.pm if you prefer.
  • ** The ApacheHandler module no longers accepts parameters when
    imported. Instead, you specify this parameter via the ApacheHandler
    constructor.
  • ** The ApacheHandler module now requires a minimum of mod_perl 1.22.
  • ** The Component’s run_count() and first_time() methods have been
    removed.
  • ** The HTML::Mason::Config module is no longer needed, and is no
    longer generated during the installation process.
  • ** The Interp’s autohandler_name and dhandler_name params no longer take
    undef as a valid value.
  • ** The Interp’s use_autohandlers, use_dhandlers, and
    allow_recursive_autohandlers parameters have all been removed.
  • ** The $m->top_args and $m->top_comp methods have been renamed to
    $m->request_args and $m->request_comp. The old methods are deprecated
    but will work until the 1.20 release.
  • ** Passing an Interp object to the ApacheHandler constructor (as in
    a handler.pl file) will no longer work unless you set the Interp’s
    resolver_class parameter to
    ‘HTML::Mason::Resolver::File::ApacheHandler’. However, you can now
    pass Interp constructor params directly to the ApacheHandler
    constructor, which will create the interp object internally.
  • ** The MasonMultipleConfig httpd.conf parameter has been removed.
    Mason can now figure this out by itself.
  • ** The HTML::Mason::Interp time() method has gone away.

[ ENHANCEMENTS AND NEW FEATURES ]

  • It is now possible to pass chunks of component content as part of a
    component call. L{Devel/Component Calls with Content}
  • Mason now supports subrequests via the new $m->subexec and
    $m->make_subrequest methods. L{Devel/Subrequests}
  • Mason no longer requires you to specify a component root or data
    directory. The component root now defaults to your document root in a
    web context, or your filesystem root in a standalone context. The
    data directory will be a subdirectory of your server root under
    mod_perl, and Mason can work without any data directory at all in
    other contexts.
  • The Resolver class API has been redesigned and is documented for the
    first time.
  • The installation process will offer to help you setup Mason for use
    with mod_perl if it can find your Apache configuration file and it
    cannot find an existing Mason configuration.
  • The HTML::Mason::Request->instance method is now the officially
    supported way of getting at the current request object outside of a
    Mason component (suggested by John Siracusa).
  • The HTML::Mason::Interp->comp_exists method now checks for a
    component’s existence without loading the component (suggested by
    Randal Schwartz).
  • Mason now includes a module called HTML::Mason::CGIHandler, which
    greatly simplifies the use of Mason via CGI scripts.
  • Mason now uses File::Spec for all filesystem operations.
  • All the .pod files have been merged into their corresponding .pm
    files, where appropriate.
  • Added the Component attr_if_exists method (suggested by Joe
    Frisbie).
  • We now use the HTML::Entities module’s encode function for the ‘h’
    substitution escape flag. This module escapes high-ascii characters
    properly.
  • Calling a method via $m->comp(‘comp:method’) works just like
    $comp->call_method(‘method’). Previously, ???
  • When an object contains other objects then the containing object’s
    constructor accepts parameters intended for the contained objects.
    For example, the Interp object contains a Resolver object and Request
    objects. The Interp’s new method will accept constructor parameter
    for both the Resolver and Request objects.
  • The ApacheHandler args_method is now a per-object parameter.
  • Mason is now much smarter about recompiling components. In general,
    it can detect if compiler options for a compiled component are
    different from the current options, and will recompile the component
    if necessary. The exception to this is that with compiler parameters
    which take callbacks (such as preprocess), Mason can only tell if such
    a parameter is present, not whether the actual callback has changed.

[ BUG FIXES ]

  • The <%args> section can now contain comments which contain the
    string ‘=>’ (reported by Chris Hutchinson).
  • Fixed the longstanding bug that using print() or $r->print() causes
    output/headers to appear out of order. You can now safely use these,
    though we still recommend that you use Mason to send output.
  • Filtered output now does appear when $m->abort() used. However, an
    abort inside a component called via $m->scomp() still cause the output
    generated by that component to disappear.

[ INTERNALS ]

  • Output buffering and filtering is handled by the new
    HTML::Mason::Buffer class.
  • All fatal errors thrown during component execution are exception
    objects in the HTML::Mason::Exception class hierarchy.
  • The CGI GET/POST argument processing code has been simplified
    (submitted by Ilmari Karonen).
  • ApacheHandler now uses a special Resolver subclass to translate URIs
    to component paths.
  • Parameters passed to “set” accessors are now validated in the same
    way as constructor parameters.
  • The component requested and the arguments it was passed are now
    properties of the Request object.

Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
Mason-users mailing list