ck::JSON;
BEGIN {
$Resource::Pack::JSON::VERSION = '0.01';
}
use Moose;
use Resource::Pack;
use Resource::Pack::JSON::URL;
extends 'Resource::Pack::Resource';
=head1 NAME
Resource::Pack::JSON -
Resource::Pack resource for the JSON Javascript library
=head1 VERSION
version 0.01
=head1 SYNOPSIS
my $resource = Resource::Pack::JSON->new(install_to => '/var/www/js');
$resource->installl;
DESCRIPTION
This provides the JSON library as a L<Resource::Pack> resource.
=cut
=head1 ATTRIBUTES
=cut
=head2 use_bundled
If true, uses the bundled copy of json2.js that is shipped with this d
package Resource::Pack::JSON::URL;
BEGIN {
$Resource::Pack::JSON::URL::VERSION = '0.01';
}
use Moose;
extends 'Resource::Pack::URL';
=head1 NAME
Resource::Pack::JSON::URL - subclass of Resource::
Pack::URL to clean up the json2.js souce
=head1 VERSION
version 0.01
=head1 DESCRIPTION
This modifies the install process to strip out the alert that json2.js includes
at the top of the file.
=cu
my $contents = $installed->slurp;
$contents =~ s/^\Qalert('IMPORTANT: Remove this line from json2.js before deployment.');\E\n//;
my $fh = $installed->openw;
$fh->print($contents);
$