Content - a content item.
<{perl $cont = get_content_object ("foo.txt"); [... etc.] }>
This object allows manipulation of WebMake content items directly.
Return the content item's name.
A textual description of the object for debugging purposes; currently it's name.
Get the filename or datasource location that this content was loaded from. Datasource locations look like this: proto:protocol-specific-location-data, e.g. file:blah/foo.txt or http://webmake.taint.org/index.html.
proto
protocol-specific-location-data
file:blah/foo.txt
http://webmake.taint.org/index.html
Return an array of filenames and locations that this content depends on, i.e. the filenames or locations that it contains variable references to.
Whether or not a content item was generated from Perl code, or is metadata. Generated content items cannot themselves hold metadata.
Expand a content item, as if in a curly-bracket content reference. If the content item has not been expanded before, the current output file will be noted as the content item's ''main'' URL.
Expand a content item, as if in a curly-bracket content reference. The current output file will not be used as the content item's ''main'' URL.
Get an item of this object's metadata, e.g.
$score = $cont->get_metadata("score");
The metadatum is converted to its native type, e.g. score is return as an integer, title as a string, etc. If the metadatum is not provided, the default value for that item, defined in HTML::WebMake::Metadata, is used.
score
title
Return a content item's score.
Return a content item's title.
Return a content item's modification date, in UNIX time_t format, ie. seconds since Jan 1 1970.
Returns the content item's declaration order. This is a number representing when the content item was first encountered in the WebMake file; earlier content items have a lower declaration order. Useful for sorting.
Get the child content items for this item. The ''child'' content items are items that use this content as their up metadatum.
up
Returns a list of content objects in unsorted order.
Returns a list of content objects sorted by the provided sort string.
Get a content item's URL. The URL is defined as the first page listed in the WebMake file's out tags which refers to that item of content.
Note that, in some cases, the content item may not have been referred to yet by the time it's get_url() method is called. In this case, WebMake will insert a symbolic tag, hold the file in memory, and defer writing the file in question until all other output files have been processed and the URL has been found.
1 POD Error
The following errors were encountered while parsing the POD:
=over without closing =back
To install HTML::WebMake, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::WebMake
CPAN shell
perl -MCPAN -e shell install HTML::WebMake
For more information on module installation, please visit the detailed CPAN module installation guide.