]> git.imager.perl.org - imager.git/blobdiff - Imager.pm
quote a few hash keys to prevent warnings on 5.004
[imager.git] / Imager.pm
index fb3d026f8bb19d30b71313734fa9749f6665e8bc..2b283a4fe6288f1c8f8992363aaa92c9b7d195fe 100644 (file)
--- a/Imager.pm
+++ b/Imager.pm
@@ -147,7 +147,7 @@ BEGIN {
   require Exporter;
   require DynaLoader;
 
-  $VERSION = '0.39';
+  $VERSION = '0.40pre1';
   @ISA = qw(Exporter DynaLoader);
   bootstrap Imager $VERSION;
 }
@@ -396,6 +396,9 @@ sub init {
 #      i_init_fonts();
 #      $fontstate='ok';
 #    }
+  if (exists $parms{'t1log'}) {
+    i_init_fonts($parms{'t1log'});
+  }
 }
 
 END {
@@ -2196,7 +2199,7 @@ sub setpixel {
     or return undef;
   if (ref $x && ref $y) {
     unless (@$x == @$y) {
-      $self->{ERRSTR} = 'length of x and y mistmatch';
+      $self->{ERRSTR} = 'length of x and y mismatch';
       return undef;
     }
     if ($color->isa('Imager::Color')) {
@@ -2225,7 +2228,7 @@ sub setpixel {
 sub getpixel {
   my $self = shift;
 
-  my %opts = ( type=>'8bit', @_);
+  my %opts = ( "type"=>'8bit', @_);
 
   unless (exists $opts{'x'} && exists $opts{'y'}) {
     $self->{ERRSTR} = 'missing x and y parameters';
@@ -2240,7 +2243,7 @@ sub getpixel {
       return undef;
     }
     my @result;
-    if ($opts{type} eq '8bit') {
+    if ($opts{"type"} eq '8bit') {
       for my $i (0..$#{$opts{'x'}}) {
         push(@result, i_get_pixel($self->{IMG}, $x->[$i], $y->[$i]));
       }
@@ -2253,7 +2256,7 @@ sub getpixel {
     return wantarray ? @result : \@result;
   }
   else {
-    if ($opts{type} eq '8bit') {
+    if ($opts{"type"} eq '8bit') {
       return i_get_pixel($self->{IMG}, $x, $y);
     }
     else {