App::Fetchware::CreateConfigOptions - Used by fetchware extensions to create their configuration options.
version 1.014
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.
# You don't actually call import() unless you're doing something weird. # Instead, use calls import for you. 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
options, but instead imports already defined ones from App::Fetchware allowing you to reuse popular configuration options like temp_dir or no_install in your fetchware extension.
temp_dir
no_install
Just use any of ONE, ONEARRREF, MANY, or BOOLEAN as faux hash keys being sure to wrap their arguments in 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. The best and most obvious way of doing that is use use App::Fetchware::CreateConfigOptions [options];.
BEGIN
use App::Fetchware::CreateConfigOptions [options];
As with the rest of App::Fetchware, App::Fetchware::ExportAPI does not return any 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.