NAME

WebService::Google::Closure::Response - Response object from compiling Javascript with Closure

SYNOPSIS

    my $res = WebService::Google::Closure->new(
      js_code => $js_code,
    )->compile;

    if ( $res->is_success ) {
        print "Shenanigans ahead:\n";
        print $res->code;
    }
    else {
        foreach my $err ( @{ $res->errors } ) {
             $txt .= sprintf("%s line (%d) char [%d].\n",
                             $err->text,
                             $err->lineno,
                             $err->charno);
        }
        die $txt;
    }

METHODS

$response->is_success

Boolean saying if the compilation was successful or not.

$response->code

Returns a string with the compiled javascript code.

$response->has_warnings

Boolean saying if the compilation generated any warnings

$response->warnings

An array reference of WebService::Google::Type::Warning objects.

$response->has_errors

Boolean saying if the compilation generated any errors

$response->errors

An array reference of WebService::Google::Type::Error objects.

$response->has_stats

Boolean saying if statistics are available

$response->stats

A WebService::Google::Type::Stats object.

LICENSE AND COPYRIGHT

Copyright 2010-2011 Magnus Erixzon.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.