#!/usr/bin/perl -wT

#---libsetup---

# having . in @INC can cause tainting issues for use

no lib '.';

use FindBin;
BEGIN {
  ($dir)=($FindBin::Bin=~/^([\w\d\-\/\.]+)$/)
    or die "invalid current directory $FindBin::Bin";
}
use lib $dir;

#---endlibsetup---

use strict;

use PhotoPub::Global qw(&init &finit);
use PhotoPub::CGIBase qw($query &printheader);
use PhotoPub::Config;

use PhotoPub::Embed qw(&embedhtml);

&init();

&embedhtml(scalar $query->Vars,\&printheader,sub { print shift; });

&finit();
