App::Fetchware::CreateConfigOptions - Used by fetchware extensions to create their configuration options.
version 1.006
use App::Fetchware::ExportAPI KEEP => [qw(start end)], OVERRIDE => [qw(lookup download verify unarchive build install uninstall)];
App::Fetchware::ExportAPI is a utility helper class for fetchware extensions. It makes it easy to ensure that your fetchware extension implements or imports all of App::Fetchware's required API subroutines.
See section "CREATING A FETCHWARE EXTENSION" in App::Fetchware in App::Fetchware's documentation for more information on how to create your very own fetchware extension.
App::Fetchware::CreateConfigOptions (CreateConfigOptions) has only one user-servicable part--it's import() method. It works just like Exporter's import() method except it takes arguments differently, and checks it's arguments more thuroughly.
# import() *must* be called in a BEGIN block, because it # creates subroutines that have prototypes, and prototypes *must* be known # about at compile time not run time! use App::Fetchware::CreateConfigOptions ONE => [qw( page_name html_page_url user_agent html_treebuilder_callback download_links_callback )], BOOLEAN => [qw( keep_destination_directory )], IMPORT => [qw( temp_dir )], ;
Creates configuration options of the same types App::Fetchware uses. These are:
install_commands './configure', 'make', 'make install'
stay_root 'On'
verify_failure_ok 1
no_install 'True'
In addition to App::Fetchware's types, import() features an additional type:
IMPORT
temp_dir
no_install
NOIMPORT
import(..., NOIMPORT => 1);
Just use any of ONE, ONEARRREF, MANY, or BOOLEAN as faux hash keys being sure to wrap their arguments in a array reference brackets []
ONE
ONEARRREF
MANY
BOOLEAN
[]
import() creates subroutines that have prototypes, but in order for perl to honor those prototypes perl must know about them at compile-time; therefore, that is why import() must be called inside a BEGIN block.
BEGIN
As with the rest of App::Fetchware, App::Fetchware::ExportAPI does not return ny error codes; instead, all errors are die()'d if it's Test::Fetchware's error, or croak()'d if its the caller's fault.
David Yingling <deeelwy@gmail.com>
This software is copyright (c) 2013 by David Yingling.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::Fetchware, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Fetchware
CPAN shell
perl -MCPAN -e shell install App::Fetchware
For more information on module installation, please visit the detailed CPAN module installation guide.