The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XAO::DO::Web::SetArg - sets base object arguments

SYNOPSIS

Currently is only useful in XAO::Web site context.

DESCRIPTION

Sets argument in parent object.

To be used in situations like the following to set default values. Or in general to set or modify current arguments.

Master template:

  <%Page path="/bits/image-template" NAME="abc"%>
  <%Page path="/bits/image-template" NAME="def" WIDTH=123%>
  <%Page path="/bits/image-template" NAME="efg" HEIGHT=432%>

/bits/image-template:

  <%SetArg name="WIDTH" value="999"%>
  <%SetArg name="HEIGHT" value="777"%>
  <IMG SRC="/images/<%NAME/f%>.gif" WIDTH="<%WIDTH%>" HEIGHT="<%HEIGHT%>">

Actual output would be:

  <IMG SRC="/images/abc.gif" WIDTH="999" HEIGHT="777">
  <IMG SRC="/images/def.gif" WIDTH="123" HEIGHT="777">
  <IMG SRC="/images/efg.gif" WIDTH="999" HEIGHT="432">

Note: Because of extra new-line characters in the template after both SetArg lines actual output would be slightly different. Pay attention to this if your HTML code is space-sensitive.

By default it does not override existing values. Use non-zero "override" argument to override.

METHODS

No publicly available methods except overriden display() method.

EXPORTS

Nothing.

AUTHOR

Copyright (c) 2005 Andrew Maltsev

Copyright (c) 2001-2004 Andrew Maltsev, XAO Inc.

<am@ejelta.com> -- http://ejelta.com/xao/

SEE ALSO

Recommended reading: XAO::Web.