The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Ixchel::functions::status - Helper function for creating status lines.

VERSION

Version 0.0.1

SYNOPSIS

    use Ixchel::functions::status;

    $status=$status.status(type=>'Foo', error=>0, status=>'Some status...', no_print=>0);

This creates a status text line in the format below...

    '[' . $timestamp . '] [' . $opts{type} . ', ' . $opts{error} . '] ' . $opts{status}."\n";

$timestamp is created as below.

    my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = localtime(time);
    my $timestamp = sprintf( "%04d-%02d-%02dT%02d:%02d:%02d", $year + 1900, $mon + 1, $mday, $hour, $min, $sec );

Functions

status

Creates a new status line for use with functions.

opts

type

The type to use. If not set it is set to 'undef'.

status

The new status. If undef '' is just returned.

error

If it is an error or not. Defaults to 0.

no_print

If it should print it or not.