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


Manual Reference Pages  -  BIGTOP::SCRIPTHELP::STYLE (3)

.ds Aq ’

NAME

Bigtop::ScriptHelp::Style - Factory for scripts’ command line and standard in handlers

CONTENTS

SYNOPSIS



    use Bigtop::ScriptHelp;
    use Bigtop::ScriptHelp::Style;

    my $style = ...

    my $style_helper = Bigtop::ScriptHelp::Style->get_style( $style );

    # pass this style as the first parameter to
    #   Bigtop::ScriptHelp->get_big_default
    #   Bigtop::ScriptHelp->augment_tree



DESCRIPTION

This module factors command line argument and standard in handling out of scripts and ScriptHelp. It is a simple factory. Call get_style with the name of a style module, to receive a style suitable for passing to <Bigtop::ScriptHelp-get_big_default>> and <Bigtop::ScriptHelp-augment_tree>>. All styles live in the Bigtop::ScriptHelp::Style:: namespace. The default style is ’Kickstart’.

Each stye must implement get_db_layout which is the only method called by Bigtop::ScriptHelp methods. See below for what it receives and returns.

METHODS

get_style Factory method.

Parameter: style name. This must be the name of a module in the Bigtop::ScriptHelp::Style:: namespace.

Returns: and object of the named style which responds to get_db_layout.

new Trivial constructor used internally to make an object solely to provide dispatching to get_db_layout. All Styles should subclass from this class, but they are welcome to override or augment new.

SUBCLASS METHODS

All subclasses should live in the Bigtop::ScriptHelp::Style:: namespace and implement one method:
get_db_layout Parameters:
invocant usually useless
art all command line args joined by spaces. Note that flags should have already been consumed by some script.
tables a hash reference keyed by existing table name, the values are always 1

Returns: a single hash reference with these keys:
all_tables the tables hash from the passed in parameters with an extra key for each new table
new_tables an array reference of new tables names
joiners ( Optional )

an array reference of new three way join tables

foreigners ( Optional )

a hash reference keyed by table name storing an array reference of the table’s new foreign keys

AUTHOR

Phil Crow, <crow.phil@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2007, Phil Crow

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.

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


perl v5.20.3 BIGTOP::SCRIPTHELP::STYLE (3) 2016-04-03

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