#!/usr/bin/perl use strict; use warnings; # change the lib path to import OO::BO::TimeBO and OO::TO::TimeTO use lib qw( /home/gargle/public_html/cgi/ ); use Test::More 'no_plan'; use DateTime; # We need the TimeBO and TimeTO classes use OO::BO::TimeBO; use OO::TO::TimeTO; my $timeBO = TimeBO->new(); is( ref $timeBO, "TimeBO", "A TimeBO object"); $timeBO->setDate(); my $timeTO = $timeBO->getTimeTO(); is( ref $timeTO, "TimeTO", "A TimeTO object"); # the output of Today is $year, $month, $day, which is exactly what # Date_to_Text_Long needs my $today = DateTime->now(); is( $timeTO->getDate() , $today->ymd(), "It's $today"); is( $timeTO->getTime() , $today->hms(), "It's $today");