Business::ISP::Vars - Perl module used to store various variables used throughout the Business::ISP:: collection of modules.
use Business::ISP::Vars; my $vardb = Business::ISP::Vars->new(); # Retrieve the different payment methods avaiable my %payment_options = $vardb->payment_methods();
This module is used to be a single location to store commonly-used list-type variables for ISP applications and modules.
Instantiates a Business::ISP::Var object. There is no config for this module.
Compares a user supplied data structure against the authoritative layout.
It checks for missing and/or extra attributes within the data structure.
TYPE is a mandatory scalar string, and contains one of: plan_info, plan_status, plan, pap_method, pap_date, payment_method, billing_method.
DATA is a mandatory parameter, and is passed in as a hashref.
ERROR is a mandatory parameter, and is an Business::ISP::Error object.
All parameters are passed in within a hash reference.
Will die if the structure is not correct.
Returns 0 upon success.
Builds an HTML select menu based on the different types.
TYPE is a mandatory scalar string that consists of the text name of one of the external methods within this module.
DEFAULT is an optional scalar string signifying which field you want to use as the 'selected' value.
NAME is an optional scalar string signifying that you want to use NAME as the returned variable name, instead of using TYPE as the name.
Example use:
my $plan_name_select = $vardb->build_select({ plan => 'plan' }); $self->pb_param( plan => $plan_name_select );
Returns an array reference of the parameters.
Checks whether a particular data type (structure) exists.
TYPE is an optional string parameter.
If called in list context, will return an array of all the known data types.
Otherwise, it will return true if the type is known, and false if not.
Identifies whether a payment method is via a credit card.
PAYMENT_METHOD is a mandatory scalar string of the payment method to check.
Returns 1 if the payment method is a credit card and the configuration file variable 'enable_bank_processing' is set to true, and 0 otherwise.
True/false check to see if a database table schema exists.
NAME is the name of the table to check, and is a mandatory parameter.
Returns 1 if the table exists, and 0 otherwise.
TYPE is a mandatory string parameter.
Returns the complete definition of the data structure identified in TYPE.
Review the "Data Structures" section in this manual for known types.
If called in list context, returns the names of the type as an array, otherwise returns a hash ref.
Takes no params. Returns an array of all the known data types.
This method returns a hash ref of attribute names that Business::ISP::Sanity is allowed to bypass it's validate_value() check on.
The keys are the actual attributes allowed to be skipped, the values are undef.
It's designed to be used as an 'exists' lookup table.
PLAN is the name of an account plan, passed in within a hash reference.
Returns the class the account plan is classified as, if possible. Otherwise, returns undef.
Steve Bertrand, <steveb at cpan.org>
<steveb at cpan.org>
Report bugs to <steveb at cpan.org>. I will be notified, and will report back to you with any updates.
You can find documentation for this module with the perldoc command.
perldoc Business::ISP::Vars
Copyright 2012 Steve Bertrand, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Business::ISP::ISP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::ISP::ISP
CPAN shell
perl -MCPAN -e shell install Business::ISP::ISP
For more information on module installation, please visit the detailed CPAN module installation guide.