The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Lithium::WebDriver::Utils - Utility functions used throughout the driver framework

DESCRIPTION

Shared utility functions to simplify the code base. Additionally timestamps can be added if the value of debug is set to 'timestamp'

FUNCTIONS

error

Print a line of text to standard error (STDERR) prefixed by 'ERROR >'.

debug

Print a string of text to standard error prefixed by 'DEBUG >', but only when debuging is turned on.

dump

Print a clean represenation of a single perl datastructure to standard error, but only when debugging is enabled in the configs. All output lines will be prefixed by 'DEBUG >'

DISABLE_MSGS

Disable all output messages, note this dangerous as you no longer get any debug level output.

BIND_LOGGING

Rebind logging functions to different functions. All rebinding lambda functions take a single parameter which is the log message.

Parameters

debug

The debug function to rebind to.

dump

The dumping function to rebind to.

error

The error function to rebind to.

EXAMPLE

To rebind the error function, an anonymous function is passed to the error parameter key, it's important to note that the lambda function takes exactly 1 input.

    BIND_LOGGING
        error => sub { print "ERROR BAD> $_[0]\n };

AUTHOR

Written by Dan Molik <dan at d3fy dot net>