Christopher Heschong
and 1 contributors

NAME

WebService::CRUST::Result

SYNOPSIS

  my $r = new Webservice::CRUST::Result->new($val, [$crust]);

Note that this object is generally only helpful when it is created by a WebService::CRUST call.

METHODS

string

The method used to stringify the object

result

An accessor for the raw converted hash result from the request

crust

An accessor that points to the WebService::CRUST object that made this request

AUTOLOAD

Any other method you call tries to get that value from the result.

If the value is a hash ref, it will be returned as another Result object;

If the value is an array ref, it will be returned as an array of Result objects, or as a ref to the array depending on the context in which it was called.

If the value is scalar it will just be returned as is.

INFLATION

If the value passed to new is a hash reference with a key called "xlink:href" then this module will look for keys called "args" and "href" and use them to construct a new request when that value is queried. For instance, assume this piece of XML is consumed by a WebService::CRUST object:

    <book name="So Long and Thank For All The Fish">
        <author xlink:href="http://someservice/author">
            <args first="Douglas" last="Adams" />
        </author>
        <price>42.00</price>
    </book>


    $crust->name;   # Returns 'So Long and Thanks For All The Fish'
    $crust->price;  # Returns '42.00'
    $crust->author; # Returns the results of a CRUST GET request to
                    # http://someservice/author?first=Douglas&last=Adams

This is pretty useful when you are exposing a database and you want to be able to follow relations fairly easily.

SEE ALSO

WebService::CRUST

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 128:

'=item' outside of any '=over'

Around line 140:

You forgot a '=back' before '=head1'