NAME

Content::Notification - Class to encode and decode Notification data to and from a HASH.

SYNOPSIS

Used in the same way as the placeholder class Content. See Content-class for more information.

DESCRIPTION

Class to encode and decode Log data to and from a HASH. Is inherited from the Content-class, so see the Content-class for more information on the use of the general methods not described here.

CONSTRUCTOR

same as for the Content placeholder-class. See the Content-class for more information.

METHODS

encode()

Inherited from the Content-class, but in this case encodes a HASH into Notification data and returns the encoded Notification data.

Input is the optional HASH reference to be encoded. If no HASH-reference is given, it will use the one internally to the Content-class and that are set by the set()-method.

It will return the Log data upon success, undef upon failure. Please check the error()-method for more information.

decode()

Inherited from the Content-class, but in this case decodes Notification data into a Perl HASH. It sets the internal HASH to the decoded result upon success.

Input is a SCALAR with the Notification data. If no input is specified it will default to a blank string.

It returns a blank string upon success or if there is remainder data after one record it returns the remainder string (which can be used again to decode the next record).

Undef is returned upon failure. Check the error()-method for more information on the failure.