View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Ron Savage > HTML-YUI3-Menu-1.01 >


Annotate this POD

View/Report Bugs

NAME ^ - Create a db table called - by default - trees

SYNOPSIS ^ [options]

        -dsn DSN
        -extra_columns columnDefinitions
        -password aPassword
        -table_name aTableName
        -username aUsername

All switches can be reduced to a single letter.

Exit value: 0 for success.


-dsn DSN

Defaults to $DBI_DSN.

Sample: dbi:Pg:dbname=menus or dbi:SQLite:dbname=/tmp/menus.sqlite.

-extra_columns columnDefinitions

The names and details of one or more extra columns to add to the table at create time.

Separate the names with commas.


Add 1 extra column
        scripts/ -e page_id:integer:default:0
Add 2 extra columns
        scripts/ -d dbi:Pg:dbname=menus -e page_id:integer:default:0,node_id:integer:default:1
        scripts/ -d dbi:Pg:dbname=menus -e "page_id:integer:default:0,node_id:varchar(255)"

With or without double quotes is ok sometimes, but are always strongly recommended.

When using characters - such as '(' - which can be interpreted by the shell, the quotes are mandatory.

When you use quotes you can then put spaces around the comma(s) and the colons.

The default is to create the table with no extra columns, just those defined in the FAQ of Tree::DAG_Node::Persist.

Note: t/test.t uses this feature, if you wish to see sample code.


Print help and exit.

-password aPassword

Defaults to $DBI_PASS.

-table_name aTableName

Use this to override the default table name 'trees'.

-username aUsername

Defaults to $DBI_USER.

syntax highlighting: