.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "HTML::Mason::Utils 3pm" .TH HTML::Mason::Utils 3pm 2024-03-05 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME HTML::Mason::Utils \- Publicly available functions useful outside of Mason .SH DESCRIPTION .IX Header "DESCRIPTION" The functions in this module are useful when you need to interface code you have written with Mason. .SH FUNCTIONS .IX Header "FUNCTIONS" .IP "data_cache_namespace ($comp_id)" 4 .IX Item "data_cache_namespace ($comp_id)" Given a component id, this method returns its default \&\f(CW\*(C`Cache::Cache\*(C'\fR namespace. This can be useful if you want to access the cached data outside of Mason. .Sp With a single component root, the component id is just the component path. With multiple component roots, the component id is \&\f(CW\*(C`key\*(C'\fR/\f(CW\*(C`path\*(C'\fR, where \f(CW\*(C`key\*(C'\fR is the key corresponding to the root that the component falls under. .ie n .IP "cgi_request_args ($cgi, $method)" 4 .el .IP "cgi_request_args ($cgi, \f(CW$method\fR)" 4 .IX Item "cgi_request_args ($cgi, $method)" This function expects to receive a \f(CW\*(C`CGI.pm\*(C'\fR object and the request method (GET, POST, etc). Given these two things, it will return a hash in list context or a hashref in scalar context. The hash(ref) will contain all the arguments passed via the CGI request. The keys will be argument names and the values will be either scalars or array references.