Debian::DEP12::ValidationWarning - validaton warning class
use Debian::DEP12::ValidationWarning; my $warning = Debian::DEP12::ValidationWarning->new( 'value \'%(value)s\' is better written as \'%(suggestion)s\'', { field => 'Bug-Submit', value => 'merkys@cpan.org', suggestion => 'mailto:merkys@cpan.org', } ); print STDERR "$warning\n";
Debian::DEP12::ValidationWarning is used to store the content of validation warning in a structured way. Currently the class is based on Text::BibTeX::Validate::Warning, but may be decoupled in the future.
Takes Text::sprintfn-compatible template and a hash with the values for replacement in the template. Three field names are reserved and used as prefixes for messages if defined: file for the name of a file, key for the index inside list and field for DEP12 field name. Field suggestion is also somewhat special, as Debian::DEP12 may use its value to replace the original in an attempt to clean up the DEP12 entry.
file
key
field
suggestion
Returns an array of fields defined in the instance in any order.
Returns value of a field.
Sets a new value for a field. Returns the old value.
Unsets value for a field. Returns the old value.
Andrius Merkys, <merkys@cpan.org>
To install Debian::DEP12, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Debian::DEP12
CPAN shell
perl -MCPAN -e shell install Debian::DEP12
For more information on module installation, please visit the detailed CPAN module installation guide.