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
AddressBook::DB::HTML(3) User Contributed Perl Documentation AddressBook::DB::HTML(3)

AddressBook::DB::HTML - Backend for AddressBook to print entries in HTML format

  use AddressBook;
  $a = AddressBook->new(source => "HTML");
  $a->write($entry);

AddressBook::DB::HTML currently supports only the sequential write method.

Behavior can be modified using the following options:

write_format
The write_format string is eval'd to determine how the entry is written. The default write_format string is:

  'table(Tr([map{td(["$_:",$attributes{$_}])} keys %attributes]))'
    

This displays the entry in a table with attribute names on the left and values on the right. As can be seen, CGI.pm tag-generating functions can be used in format strings. The "%attributes" hash is available for use. The keys of %attributes are HTML backend attribute names, and the values are the corresponding attribute values. Specific attributes can also be referenced by name using a scalar with the same name as the attribute. For example,

  'Name: $Name'
    

Assuming that "Name" is a valid HTML attribute, this format string will display entry names. This is equivalent to:

  'Name: $attributes{Name}'
    

The HTML backend recognizes the string "keys %attributes", and substitues an expression which ensures that the "order" meta-attribute is obeyed.

form_format
The form_format string is eval'd to construct an html entry form. The default form_format string is:

  table(Tr({-valign=>"TOP"},[map{td([$_,$attributes{$_}])} keys %attributes]))
    

Which generates a table of fields with labels on the left. The input type is based on the attribute type, eg. "text" attributes appear as text input fields, "boolean" attributes appear as checkbox inputs, etc... The default values of the entry fields are the current values of the entry's attributes.

intra_attr_sep
The string to use in joining multiple instances of the same attribute. The default is "<br>"

Mark A. Hershberger, <mah@everybody.org> David L. Leigh, <dleigh@sameasiteverwas.net>

AddressBook, AddressBook::Config, AddressBook::Entry.
2001-01-15 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.