]> git.imager.perl.org - imager.git/blobdiff - lib/Imager/ExtUtils.pm
access to poly_poly from perl as polypolygon()
[imager.git] / lib / Imager / ExtUtils.pm
index 93a63f519c3bea91e06ce841095712930b5773cb..61caa07239d608ab7e0c536776508d88b542673b 100644 (file)
@@ -1,9 +1,10 @@
 package Imager::ExtUtils;
 use strict;
+use File::Spec;
 
 use vars qw($VERSION);
 
-$VERSION = "1.001";
+$VERSION = "1.002";
 
 =head1 NAME
 
@@ -27,9 +28,13 @@ Returns the base directory where Imager is installed.
 
 # figure out where Imager is installed
 sub base_dir {
-  for my $dir (@INC) {
-    if (-e "$dir/Imager.pm") {
-      return $dir;
+  for my $inc_dir (@INC) {
+    if (-e "$inc_dir/Imager.pm") {
+      my $base_dir = $inc_dir;
+      unless (File::Spec->file_name_is_absolute($base_dir)) {
+       $base_dir = File::Spec->rel2abs($base_dir);
+      }
+      return $base_dir;
     }
   }
 
@@ -117,7 +122,7 @@ __END__
 
 =head1 AUTHOR
 
-Tony Cook <tony@imager.perl.org>
+Tony Cook <tonyc@cpan.org>
 
 =head1 REVISION