View on
Sergey Rusakov > ePortal-4.5 >


Annotate this POD

View/Report Bugs

NAME ^ - Base Mason component

SYNOPSIS ^ is base Mason component for entire ePortal site.


Attributes are defined via <attr> mason tag:

 Attribute => value


This is title for the page. This title is used for <TITLE> HTML tag and displayed at top of every ePortal's page.

This attribute is used for static Title. For dynamic Title see Title method


May be 1 or 0. Default is 0.

Used for popup windows. No windows caption, no APP bar, no menus.

Directory browsing

There are some attributes to control directory browsing process. Browsing is go when no index.htm file in directory.


Enable or disable directory browsing. Default is 1. Is browsing is disabled then redirect to /errors/not_found.htm is done.


Show or not .. at top of list of files.


Should be sub ref. Two arguments ($a,$b) are passed to sub which both are absolute filenames.


How to discover a description of a file? May be HASH with filenames or sub ref. Two arguments (absolute_filename,filename) are passed to sub.

The default is \&ePortal::Utils::filter_auto_title


How many columns and which to show? This is array ref. Possible values are: /icon name size modified description/


Array ref with regexs. First all dir_include regexs work then dir_exclude. Default is to include all files.


How to title the directory listing? Default is directory name.

Access control

You always may restrict access to some pages with a help of .htaccess. Use require directives to to this.

Here is another way to do this. You may use the following attributes in pages or directory autohandlers to restrict access to some parts of your site.

Attributes are processed in given order. If any of them are true then access is allowed else redirect is made to /errors/require_xxx.htm page.

require_registered => boolean

Requre user to be registered. Deny access for anonymous users.

require_user => [ ]

Require user to be registered and be listed. Argument if array ref to list of valid user names.

require_group => [ ]

Require user to be registered and be member of a group. Argument if array ref to list of valid group names.

require_admin => boolean

Require user to be registered and be an admin.


You may overload some autohandler's method to add more functionality to a page.

 <%method method_name>
 .. your code goes here
 return "something";

Overloaded parent can be called as

 <& PARENT:method_name, %ARGS &>


Add any HTML text to put in <HEAD> section of HTML page.


This method is called just after request processing preparation (check user, etc.) but before any content is sent to client. This method is useful for client events processing and handling redirects.

Any string returned is passed to to do external redirect.


This is the same functionality as Title attribute. This method is used to make the Title be dynamic not static.


This is very last part of screen. Useful to show copyright messages


This method is used to show a menu on the left side of the screen. It returns an array or pairs.

 <% method MenuItems>
 % return [
   ['menu1' => 'http://...'],
   ['---' => '---'],
   ['html' => '<b>this is HTML</b>']

Every pair may be any of the following


Some arguments names are reserved for internal purposes. Here are:


Sergey Rusakov, <>

syntax highlighting: