aboutsummaryrefslogtreecommitdiff
path: root/Perl/Zinc/Logo.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Perl/Zinc/Logo.pm')
-rw-r--r--Perl/Zinc/Logo.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/Perl/Zinc/Logo.pm b/Perl/Zinc/Logo.pm
index b83155f..b601f0d 100644
--- a/Perl/Zinc/Logo.pm
+++ b/Perl/Zinc/Logo.pm
@@ -16,8 +16,6 @@ use strict;
use Carp;
use Math::Trig;
-Construct Tk::Widget 'ZincLogo';
-
my @Gradiants;
@@ -94,13 +92,15 @@ my %builder = (-gradset => {'logoshape' => '=axial 270 |#ffffff;100 0 28|#66848c
sub new {
my $proto = shift;
my $type = ref($proto) || $proto;
- my $widget = shift;
my %params = @_;
my $self = {};
bless ($self, $type);
-
- $self->{'-widget'} = $widget;
+ if (exists $params{'-widget'}) {
+ $self->{'-widget'} = $params{'-widget'};
+ } else {
+ croak "in Tk::Zinc::Logo constructor, the -widget attribute must be defined\n";
+ }
$self->{'-parent'} = (exists $params{'-parent'}) ? $params{'-parent'} : 1;
$self->{'-priority'} = (exists $params{'-priority'}) ? $params{'-priority'} : 500;
$self->{'-position'} = (exists $params{'-position'}) ? $params{'-position'} : [0, 0];