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
Bigtop(3) User Contributed Perl Documentation Bigtop(3)

Bigtop - A web application data language processor

See Bigtop::Docs::TentTut or Bigtop::Docs::Tutorial for how to create a Bigtop file. Bigtop::Docs::TOC is a guide to all of the documentation modules.

The real synopsis (see Bigtop::ScriptHelp::Style::Kickstart):

    bigtop --new AppName 'stock<-lot
    stock(symbol,name)
    lot(bought:date,price:int4,shares:int4)'

or go manual:

    vi your_app.bigtop (or use tentmaker see Bigtop::Docs::TentTut)
    bigtop --create your_app.bigtop all

Then run your app (if you have sqlite in your path):

    cd AppName
    ./app.server

Modify your bigtop file and try again:

    bigtop docs/your_app.bigtop all

Bigtop is a language for describing the data of a web application. Usually this data will be stored in a relational database. Once you have a description of your data, you can generate a web application from it. This includes all the pieces you need like: the sql statements ready for feeding to your database command line tool, the httpd.conf you need to Include in the httpd.conf on your system, the modules that will handle the web requests, the models that make the database tables look like classes, etc.

If you need to alter the data model in the future, you can change your original description to match the new reality, then regenerate the application without fear of losing hand written code (though you may have to modify some of it to reflect the new reality).

This module is really a place holder, but it does provide some developer routines (which are not exported):
write_file
    use Bigtop;
    Bigtop::write_file( $file_name, $file_content, $no_overwrite )
    

This attempts to write $file_content to $file_name and dies on failures of open or close. Further, if you pass a true no_overwrite flag, it will check to see if the file exists and refuse to overwrite it. In that case, the user gets a warning that the file has been skipped because it already exists. If you don't want the user to see the warning, turn off the Bigtop warning. To avoid fatal errors on write failures, wrap in an eval. Putting these together, we come to my typcial usage:

    eval {
        no warnings qw( Bigtop );
        Bigtop::write_file( $some_output_file, $content, 'no_overwrite' );
    }
    warn $@ if $@;
    
make_module_path
(Note that make_module_path uses File::Spec, so even though Unix directory syntax is shown below, the function should work in other places.)

    use Bigtop;
    Bigtop::make_module_path( $build_dir, $module_name );
    

This attempts to make all the directories from $build_dir to the home of the module. It assumes that lib comes immediately after $build_dir.

For example, a call like:

    Bigtop::make_module_path(
        '/home/username/App-Name', 'App::Name::Subname'
    );
    

Attempts to make these directories:

    /home/username/App-Name/lib
    /home/username/App-Name/lib/App
    /home/username/App-Name/lib/App/Name
    /home/username/App-Name/lib/App/Name/Subname
    

It doesn't report failures. Making directories can fail because the directories already exist (in which case you probably don't care) or because they could not be written (in which case you'll notice soon enough, when you try to write to them).

None.

Bigtop::Docs::TOC

If you are interested in Bigtop's inner workings, consider delving into some of these:

  • Bigtop::Parser
  • Bigtop::Keywords
  • Bigtop::Backend::Init
  • Bigtop::Backend::Init::Std
  • Bigtop::Backend::SQL
  • Bigtop::Backend::SQL::Postgres
  • Bigtop::Backend::CGI
  • Bigtop::Backend::CGI::Gantry
  • Bigtop::Backend::Control
  • Bigtop::Backend::Control::Gantry
  • Bigtop::Backend::HttpdConf
  • Bigtop::Backend::HttpdConf::Gantry
  • Bigtop::Backend::Model
  • Bigtop::Backend::Model::GantryDBIxClass
  • Bigtop::Backend::SiteLook::GantryDefault

The backends come in types. Ideally, these types all share a set of keywords which are requested from Bigtop::Keywords in the type's module. So Bigtop::Backend::SQL is meant to request the KEYWORDS that all Bigtop::SQL::* modules use. They may request others, but only if they are specific to the generated target. For example, there might be some Postgres specific keyword which doesn't apply to other databases. It should be requested in "Bigtop::Backend::SQL::Postgres". Even if you need backend specific keywords, you should put them in "Bigtop::Keywords" so tentmaker can display them.

Bigtop is discussed on the Gantry mailing list. Please visit http://www.usegantry.org, and click on the Mailing List tab under the banner, for instructions.

Bigtop source is available for svn checkout. For instructions, visit:

    http://usegantry.org

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

Copyright (C) 2005-7, 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.

2022-04-09 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.