commands(3)
NAME
HTML::Mason::Commands - Old Mason command reference
DESCRIPTION
- This was the documentation for the "mc_" command set. In
Mason 0.8 and beyond, "mc_" commands have been replaced by
the new HTML::Mason::Request API. e.g. - mc_comp becomes $m->comp
mc_file becomes $m->file
etc. - Below is a description of how to convert your "mc_" com
mands to "$m" methods. There is also a utility provided
with the distribution, bin/convert0.8.pl, that performs these conversions for you. For backwards compatibility
"mc_" commands still work for a limited time but will
eventually go away.
"mc_abort" becomes "$m->abort"- "mc_auto_comp" becomes "$m->fetch_next->path"
- "mc_auto_next" becomes "$m->call_next"
- "mc_cache" becomes "$m->cache"
- "mc_cache_self" becomes "$m->cache_self"
- "mc_caller" becomes "$m->callers(1)->path"
- "mc_call_self" becomes "$m->call_self"
- "mc_comp" becomes "$m->comp"
- "mc_comp_exists" becomes "$m->comp_exists"
- "mc_comp_source()" becomes "$m->cur
rent_comp->source_file" - "mc_comp_source(path)" becomes
"$m->fetch_comp(path)->source_file". This no longer
works with nonexistent components as it used to. - "mc_comp_stack" becomes "map($_->title,$m->callers)"
- "mc_date" goes away, this was a legacy function.
Replace by calling the date formatting function of
your choice on "$m->time". - "mc_dhandler_arg" becomes "$m->dhandler_arg"
- "mc_file" becomes "$m->file"
- "mc_file_root" becomes "$m->file_root"
- "mc_out" becomes "$m->out"
- "mc_time" becomes "$m->time"
- "mc_suppress_http_header" (with or without argument)
no longer has any effect and can simply be removed.
See Devel/Sending HTTP Headers for more information.
AUTHOR
Jonathan Swartz, swartz@pobox.com
SEE ALSO
- HTML::Mason, HTML::Mason::Devel