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 => '',
            suggestion => '',
    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.


new( $message, $fields )

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.


Returns an array of fields defined in the instance in any order.

get( $field )

Returns value of a field.

set( $field, $value )

Sets a new value for a field. Returns the old value.

delete( $field )

Unsets value for a field. Returns the old value.


Andrius Merkys, <>