GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SQL::TRANSLATOR::ROLE::ERROR (3)

.ds Aq ’

NAME

SQL::Translator::Role::Error - Error setter/getter for objects and classes

CONTENTS

SYNOPSIS

In the class consuming the role:



    package Foo;
    use Moo;
    with qw(SQL::Translator::Role::Error);

    sub foo {
        ...
        return $self->error("Something failed")
            unless $some_condition;
        ...
    }



In code using the class:



    Foo->foo or die Foo->error;
    # or
    $foo->foo or die $foo->error;



DESCRIPTION

This Moo::Role provides a method for getting and setting error on a class or object.

METHODS

CW$object_or_class->error([$message])

If called with an argument, sets the error message and returns undef, otherwise returns the message.

As an implementation detail, for compatibility with Class::Base, the message is stored in $object->{_ERROR} or $Class::ERROR, depending on whether the invocant is an object.

SEE ALSO

o Error Handling in Class::Base
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SQL::TRANSLATOR::ROLE::ERROR (3) 2013-06-28

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.