#!/usr/bin/perl use strict; use warnings FATAL => qw( all ); package my::site::Programs; sub get_data { my $self = shift; # not used but passed with '->' notation return q{This is a list of B that I am using or have used. I can not account for I the software we have had and used over the years. Some of it was so bad, we blanked it out of our heads. This list does not include a full list of hardware drivers either. So much software, so little time or in this case patience.}; } 1; # not sure if this is actually needed here, but would be if you moved this to a .pm that is "use"d or "require"d # replicate the functionality of the original Programs.pl package main; use CGI::Carp qw(fatalsToBrowser); use lib '../files/lib'; use Base::Page qw(page story); use Util::StoryMagic qw(program_magic); my $magic = program_magic; page( 'code' => sub { story(my::site::Programs->get_data(), { 'line magic' => $magic }) }); # note you'll have to change how you handle what was passed as "*DATA" # # NOTE, since you're now not using __DATA__ (via *DATA handle), you can make the "main" content # minimal by passing in just the code reference: # # package main; # use lib '../files/lib'; # Base::Page->page( code => \&my::site::Program::get_data, story => q{Util::StoryMagic} ); #