Ilia Lobsanov > Error-Dumb > Error::Dumb

Download:
Error-Dumb-0.02.tar.gz

Dependencies

Annotate this POD (1)

View/Report Bugs
Module Version: 1.02   Source  

NAME ^

Error::Dumb - simple error management for simple classes

SYNOPSIS ^

  use Some::Simple::Class;

  my $Obj = new Some::Simple::Class;
  $Obj->doSomething() or die $Obj->error():


  package Some::Simple::Class;

  use Error::Dumb;
  use vars qw(@ISA);
  # inherit from Error::Dumb
  @ISA = qw(Error::Dumb);

  sub doSomething {
    my $self = shift;
    return $self->_setError('oops, failed to do something');
  }

DESCRIPTION ^

Error::Dumb is a base class that is meant to be inherited by other classes. All this class provides is an interface for setting and retrieving error messages; as documented below...

INTERFACE ^

error

Accessor for private scalar ERROR.

err

Alias to error()

_setError(ERRMSG)

Set private scalar ERROR to ERRMSG.

AUTHOR ^

Ilia Lobsanov <ilia@lobsanov.com>

COPYRIGHT ^

  Copyright (c) 2001 Ilia Lobsanov, Nurey Networks Inc.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: