Revision: 884
Author: tim.bunce
Date: Wed Oct 28 03:32:54 2009
Log: Enable ARCHLIB_EXP to be undefined

http://code.google.com/p/perl-devel-nytprof/source/detail?r=884

Modified:
  /trunk/NYTProf.xs
  /trunk/lib/Devel/NYTProf/FileInfo.pm

=======================================
--- /trunk/NYTProf.xs   Mon Oct 26 15:56:52 2009
+++ /trunk/NYTProf.xs   Wed Oct 28 03:32:54 2009
@@ -915,7 +915,9 @@
      NYTP_printf(out, ":%s=%s\n",       "application", SvPV_nolen(sv));
      /* %Config values */
      NYTP_printf(out, ":%s=%s\n",       "PRIVLIB_EXP",    PRIVLIB_EXP);
+#ifdef ARCHLIB_EXP
      NYTP_printf(out, ":%s=%s\n",       "ARCHLIB_EXP",    ARCHLIB_EXP);
+#endif

  #ifdef HAS_ZLIB
      if (compression_level) {
=======================================
--- /trunk/lib/Devel/NYTProf/FileInfo.pm        Thu Oct 22 09:05:10 2009
+++ /trunk/lib/Devel/NYTProf/FileInfo.pm        Wed Oct 28 03:32:54 2009
@@ -119,8 +119,10 @@
      my $self = shift;
      my $filename = $self->filename;
      my $attributes = $self->profile->attributes;
-    return 1 if $filename =~ /\Q$attributes->{PRIVLIB_EXP}/;
-    return 1 if $filename =~ /\Q$attributes->{ARCHLIB_EXP}/;
+    for (@{$attributes}{qw(PRIVLIB_EXP ARCHLIB_EXP)}) {
+        next unless $_;
+        return 1 if $filename =~ /\Q$_/;
+    }
      return 0;
  }


--~--~---------~--~----~------------~-------~--~----~
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to