Beruflich Dokumente
Kultur Dokumente
An Introduction
About Mason
Components
Component
http://www.diya-gachar.bl.hostrehearsal.com/test/eg/page001.cmp
http://www.diya-gachar.bl.hostrehearsal.com/test/eg/page002.cmp
<%perl>
my %emp = ( id => 605 , name => 'Guruprasad' ,
post => 'Software Engineer' );
foreach my $data (keys %emp ){
print "$data : $emp{$data}<br>";
}
</%perl>
http://www.diya-gachar.bl.hostrehearsal.com/test/eg/page003.cmp
<html>
<head>
<title>
Testing Header
</title>
Header Page - Hello
</head>
<body bgcolor='aqua'>
<hr>
page004f.cmp
</body>
<hr>
For further details contact ....
</html>
page004.cmp
$m
Special Globals
It is an HTML::Mason::Request object
$r
% $m->comp('page004h.cmp');
This is content of the page shown from
page004.cmp
% foreach my $no (1..10){
<br><% $no %>
%}
% $m->comp('page004f.cmp');
http://www.diya-gachar.bl.hostrehearsal.com/test/eg/page004b.cmp
args block
<%args>
$no
</%args>
% foreach my $i(1..10){
<br><% $no %> x <% $i %> = <% $no*$i %>
%}
http://www.diya-gachar.bl.hostrehearsal.com/test/eg/page005.cmp?no=8
http://www.diya-gachar.bl.hostrehearsal.com/test/eg/page005.cmp
<%args>
$no => 5
</%args>
% foreach my $i(1..10){
<br><% $no %> x <% $i %> = <% $no*$i %>
%}
http://www.diya-gachar.bl.hostrehearsal.com/test/eg/page006.cmp
<%args>
$no => 5
</%args>
% $m->comp('page006.cmp', no => $no);
http://www.diya-gachar.bl.hostrehearsal.com/test/eg/page008.cmp
<%init> blocks
<%filter> blocks
<%once> blocks
<%cleanup> blocks
<%args>
$username => 'testrajesh'
</%args>
<table align='center' border=1>
<tr><th>ACL</th></tr>
% foreach my $data( @$acl_data ){
<tr><td><% $data->[0] %></td></tr>
%}
</table>
<%once>
use BL::SQL;
my $dbh_billing = BL::SQL::ConnectToDB('billing','','','db-report');
my $acl_cur = $dbh_billing->prepare( <<EOQ );
SELECT ProductName FROM ACL a,Product b
WHERE a.ProductID=b.ProductID AND a.UserName = ? AND a.Status=1
EOQ
</%once>
<%init>
$acl_cur->execute($username);
my $acl_data = $acl_cur->fetchall_arrayref;
</%init>
<%cleanup>
$acl_cur->finish;
</%cleanup>
http://www.diya-gachar.bl.hostrehearsal.com/test/eg/page011.cmp?username=testrajesh
<%text> blocks
<%doc> blocks
%ARGS
% foreach my $i(1..10){
<br><% $ARGS{no} %> x <% $i %> = <%
$ARGS{no}*$i %>
%}
http://www.diya-gachar.bl.hostrehearsal.com/test/eg/page012.cmp?no=9
Autohandler