HTML::Pager, Navigation not working



Hi geeks,

I tried to use HTML::Pager to display my database contents. The
contents are displayed but navigation doesnot work. I have given my
code below.

----

#!/usr/bin/perl

#uses
use strict;
use warnings;
use diagnostics;
use DBI;
use CGI;
use HTML::Pager;

#Declare Variables
my $query=CGI->new();
my $count=0;

#Fetch DB Connects

my $get_data_sub = sub {
my (@return_array,@data);

#connect db & prepare stmt
my $dbHandle =
DBI->connect("dbi:mysql:tempdb","user","password") or die ("Cannot
Connect to database");
my $stmtHandle = $dbHandle->prepare("select sno,name,age,deptno
from sample1");

#fetch content from Database
$stmtHandle->execute();

while(@data=$stmtHandle->fetchrow_array())
{
push(@return_array, [@data]);
}

#disconnect db
$stmtHandle->finish();
$dbHandle->disconnect();

return \@return_array;
};

#Pager
my $pager = HTML::Pager->new(query=>$query,
get_data_callback => $get_data_sub,
rows => 11,
page_size =>5,
cell_space_color => '#000000',
cell_background_color => '#ffffff',
debug => 1
);

print "Content-Type: text/html\n\n";
print $pager->output;

---
Thanks,
yesvee

.