GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
FormArticle(3) User Contributed Perl Documentation FormArticle(3)

News::FormArticle - derivative of News::Article

  use News::FormArticle;

See below for functions available.

Like News::Article, but designed to be constructed from a file containing form text with substitutions.

Currently, the source text is substituted as follows:

Variables are denoted by $NAME or @NAME (where NAME is any simple identifier). (The sequences $$ and @@ denote literal $ and @ characters.) Variables of the form $NAME are expected to supply scalar values which are interpolated; variables of the form @NAME are expected to supply lists (or references to arrays) which are interpolated with separating newlines.

Values of variables are found by consulting the list of sources supplied. Each source may be either a reference to a hash, or a reference to code.

Source hashes may contain as values either the desired value (scalar or reference to array), or a typeglob, or a code reference which will be called to return the result. (Since typeglobs are allowed values, it is possible to supply a reference to a module symbol table as a valid source.)

Code references supplied as sources are invoked with the variable name (including the leading $ or @) as the only parameter. In the degenerate case, all variables accessible in the source scope may be made available for interpolation by supplying the following as a source:

  sub { eval shift }

If multiple sources are supplied, then each is consulted in turn until a defined value is found.

  use News::FormArticle;

Exports nothing.

new ( FILE [, SOURCE [...]] )
Construct an article from the specified file, performing variable substitution with values supplied by the "SOURCE" parameters (see Description). FILE is any form of data recognised by News::Article\'s read() method.

Andrew Gierth <andrew@erlenstar.demon.co.uk>

Copyright 1997 Andrew Gierth <andrew@erlenstar.demon.co.uk>

This code may be used and/or distributed under the same terms as Perl itself.

Hey! The above document had some coding errors, which are explained below:
Around line 186:
You forgot a '=back' before '=head1'
2001-11-08 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.