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 dont 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:
(Note that make_module_path uses File::Spec, so even though Unix directory
syntax is shown below, the function should work in other places.)
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:
Attempts to make these directories:
It doesnt report failures. Making directories can fail because the directories already exist (in which case you probably dont care) or because they could not be written (in which case youll notice soon enough, when you try to write to them).
If you are interested in Bigtops inner workings, consider delving into some of these:
The backends come in types. Ideally, these types all share a set of keywords which are requested from Bigtop::Keywords in the types 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 doesnt 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.
o Bigtop::Parser o Bigtop::Keywords o Bigtop::Backend::Init o Bigtop::Backend::Init::Std o Bigtop::Backend::SQL o Bigtop::Backend::SQL::Postgres o Bigtop::Backend::CGI o Bigtop::Backend::CGI::Gantry o Bigtop::Backend::Control o Bigtop::Backend::Control::Gantry o Bigtop::Backend::HttpdConf o Bigtop::Backend::HttpdConf::Gantry o Bigtop::Backend::Model o Bigtop::Backend::Model::GantryDBIxClass o Bigtop::Backend::SiteLook::GantryDefault
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:
Phil Crow, <email@example.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.
|perl v5.20.3||BIGTOP (3)||2016-04-03|