Simple;
use File::Slurp;
use HTML::TreeBuilder;
use HTML::Element::Library;
use JSON::MaybeXS qw/encode_json decode_json/;
use Plack::Builder;
use Plack::Request;
use Text::CSV;
use Try::Tiny;
sub HT
fid('notes')->find('li') => @notes);
$tree->look_down(name => 'products')->attr(value => encode_json \@data);
$tree->look_down(name => 'total')->attr(value => $total);
[200, ['Content-type' => 't
= sprintf "%X%04X", time, $$;
my $err;
try {
$db{$$}->begin_work;
my $products = decode_json $req->body_parameters->{products};
for my $prod (@$products) {
my $stock = $db{$$}->select