#!/usr/bin/env perl use 5.10.0; use strict; use warnings; # DO CHANGE # Linux: Path to libraries (local) use lib qw(/home/bislinks/perl5/lib/perl5); # Linux: Path to folder containing Template.pm use lib qw(/home/bislinks/cgi-bin/A1z/Html5); # Windows: Path to folder containing Template.pm use lib qw(C:/Users/hp/up/A1z/Html5); # Paths based on Operating System this app is running on my %os; %os = ( win => { base => "C:/Users/hp/up/A1z/Html5", cgibase => "C:/Users/hp/up/A1z/Examples/Ex_Html5", cgiurl => "https://192.168.1.103:6684/A1z/Examples/Ex_Html5", }, linux => { base => "/home/bislinks/cgi-bin/A1z/Html5", cgibase => "/home/bislinks/cgi-bin/A1z/Examples/Ex_Html5", cgiurl => "", }, ); # END USER CONFIG # DO NOT CHANGE my %sys; if ($ENV{OS} and $ENV{OS} =~ /^Win/i ) { $sys{base} = "$os{win}->{base}" || '.'; $sys{cgibase} = "$os{win}->{cgibase}" || "."; $sys{cgiurl} = "$os{win}->{cgiurl}" || "/"; } elsif (!defined $ENV{OS} or $ENV{OS} eq '' ) { $sys{base} = "$os{linux}->{base}"; $sys{cgibase} = "$os{linux}->{cgibase}"; $sys{cgiurl} = "$os{linux}->{cgiurl}" || "/"; } else { $sys{base} = "$os{linux}->{base}"; $sys{cgibase} = "$os{linux}->{cgibase}"; $sys{cgiurl} = "$os{linux}->{cgiurl}" || "/"; } use Template; my $package_name = 'HTML5::Template'; # HTML stuff my $h = Template->new(); say $h->header('utf8'); # say $h->start_html(); say $h->head_title("$package_name"); say $h->head_meta(); say $h->head_meta("description---How to use $package_name ", "keywords---Package, perl module, html5, cgi compatible", "author---webmaster at bislinks.com", ); say $h->head_js_css(); say $h->head_js_css('Template.css'); say $h->end_head(); say $h->begin_body(); say $h->body_topnavbar(); say qq~