WebService::Google::Closure::Response - Response object from compiling Javascript with Closure
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; }
Boolean saying if the compilation was successful or not.
Returns a string with the compiled javascript code.
Boolean saying if the compilation generated any warnings
An array reference of WebService::Google::Type::Warning objects.
Boolean saying if the compilation generated any errors
An array reference of WebService::Google::Type::Error objects.
Boolean saying if statistics are available
A WebService::Google::Type::Stats object.
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.
To install WebService::Google::Closure, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Google::Closure
CPAN shell
perl -MCPAN -e shell install WebService::Google::Closure
For more information on module installation, please visit the detailed CPAN module installation guide.