Data-JPack
view release on metacpan or search on metacpan
lib/Data/JPack.pm view on Meta::CPAN
package Data::JPack;
use strict;
use warnings;
use feature ":all";
our $VERSION="v0.1.0";
use feature qw<say>;
no warnings "experimental";
use MIME::Base64;
use IO::Compress::RawDeflate qw<rawdeflate>;
use IO::Uncompress::RawInflate qw<rawinflate $RawInflateError>;
lib/Data/JPack/App.pm view on Meta::CPAN
my @outputs;
# put bootstrap into 0/0
push @outputs, "app/jpack/boot/00000000000000000000000000000000/00000000000000000000000000000000.jpack";
map {($inputs[$_],$outputs[$_])} 0..$#inputs;
}
# Javascript resources absolute paths. These file are are to be copied into target output
sub js_paths {
#use feature ":all";
#say STDERR "Share dir is $share_dir";
grep !/pako/, <$share_dir/js/*>;
}
# Encode the bootstrapping segment into a tempfile, return the path to this temp file
# This file contains the pako.js module as a chunk. Also prefixed with the
# chunkloader and worker pool contents
#
my $dir;
t/01-container.t.dis view on Meta::CPAN
use strict;
use warnings;
use feature ":all";
#use Test::More;
use Data::JPack::Container;
my $container=Data::JPack::Container->new();
say $container->build;
t/01-encode.t.dis view on Meta::CPAN
use strict;
use warnings;
use feature ":all";
#use Test::More;
use Data::JPack;
#say jpack_encode_file "pako/dist/pako.js";
my $jpack=Data::JPack->new;
t/01-file-db.t view on Meta::CPAN
use strict;
use warnings;
use feature ":all";
use Data::JPack;
use Test::More;
use File::Path qw<make_path remove_tree>;
use File::Basename qw<dirname basename>;
# Test file db structures
my $html_container="_data/index.html";
my $html_root=dirname $html_container;
use Test::More;
use feature ":all";
use Data::JPack;
say STDERR "JS REsources are ", "@{[Data::JPack::js_paths]}";
say STDERR "JS REsources are ", "@{[Data::JPack::resource_map]}";
ok 1;
done_testing;
t/02-process.t.dis view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use feature ":all";
use AnyEvent;
use AnyEvent::AIO;
use Promise::XS;
use Data::Base64;
#open my $outFile,">", "base64.test";
say "#Creating service";
my $service=Data::Base64::new;
Data::Base64::open $service, "base64.test";
t/02-unpack.t.dis view on Meta::CPAN
use strict;
use warnings;
use feature ":all";
use Data::JPack qw<jpack_decode_file>;
my $data=jpack_decode_file @ARGV;
while($data){
say unpack "H*", substr $data, 0, 16,"";
}
( run in 0.683 second using v1.01-cache-2.11-cpan-cba739cd03b )