package HTML::Perlinfo::Base;
use HTML::Perlinfo::Common;
use HTML::Perlinfo::General;
use Carp ();
use warnings;
use strict;
sub new {
my ($class, %params) = @_;
my $self = {};
$self->{full_page} = 1;
$self->{title} = 0;
$self->{bg_image} = '';
$self->{bg_position} = 'center';
$self->{bg_repeat} = 'no_repeat';
$self->{bg_attribute} = 'fixed';
$self->{bg_color} = '#ffffff';
$self->{ft_family} = 'sans-serif';
$self->{ft_color} = '#000000';
$self->{lk_color} = '#000099';
$self->{lk_decoration} = 'none';
$self->{lk_bgcolor} = '';
$self->{lk_hvdecoration} = 'underline';
$self->{header_bgcolor} = '#9999cc';
$self->{header_ftcolor} = '#000000';
$self->{leftcol_bgcolor} = '#ccccff';
$self->{leftcol_ftcolor} = '#000000';
$self->{rightcol_bgcolor} = '#cccccc';
$self->{rightcol_ftcolor} = '#000000';
foreach my $key (keys %params) {
if (exists $self->{$key}) {
$self->{$key} = $params{$key};
}
else {
error_msg("$key is an invalid attribute");
}
}
bless $self, $class;
return $self;
}
sub info_all {
my $self = shift;
my %param = @_;
error_msg("invalid parameter") if (defined $_[0] && exists $param{'links'} && ref $param{'links'} ne 'ARRAY');
$self->links(@{$param{'links'}}) if exists $param{'links'};
my $html;
$self->{title} = 'perlinfo(INFO_ALL)' unless $self->{title};
$html .= $self->print_htmlhead() if $self->{full_page};
$html .= print_general();
$html .= print_variables();
$html .= print_thesemodules('core');
$html .= print_license();
$html .= "