Author: tim.bunce
Date: Thu Mar  5 06:37:52 2009
New Revision: 691

Modified:
    trunk/Changes
    trunk/NYTProf.xs
    trunk/lib/Devel/NYTProf/Util.pm
    trunk/t/30.util.t

Log:
Remove embedded dots from filename for html report generation.
Tweak the level for a trace message.


Modified: trunk/Changes
==============================================================================
--- trunk/Changes       (original)
+++ trunk/Changes       Thu Mar  5 06:37:52 2009
@@ -7,7 +7,8 @@
  =head2 Changes in Devel::NYTProf 2.09 (svn rXXX)

    Fixed report filename generation to remove colons,
-    reported by Adam Kennedy in rt bug #43798.
+    for Windows, reported by Adam Kennedy in rt bug #43798.
+  Fixed report filename generation to remove dots, for VMS.

  =head2 Changes in Devel::NYTProf 2.08 (svn r685) 15th Feb 2009


Modified: trunk/NYTProf.xs
==============================================================================
--- trunk/NYTProf.xs    (original)
+++ trunk/NYTProf.xs    Thu Mar  5 06:37:52 2009
@@ -1438,7 +1438,7 @@
          }
          o = o->op_next;
      }
-    if (trace_level >= 1) {
+    if (trace_level >= 3) {
          warn("\tstart_cop_of_context: can't find next cop for %s  
line %ld\n",
              block_type[CxTYPE(cx)], (long)CopLINE(PL_curcop_nytprof));
          do_op_dump(1, PerlIO_stderr(), start_op);

Modified: trunk/lib/Devel/NYTProf/Util.pm
==============================================================================
--- trunk/lib/Devel/NYTProf/Util.pm     (original)
+++ trunk/lib/Devel/NYTProf/Util.pm     Thu Mar  5 06:37:52 2009
@@ -218,7 +218,8 @@
      my ($fname) = @_;
      # replace / and \ with html safe '-', we also do a bunch of other
      # chars, especially ':' for Windows, to make the namer simpler and  
safer
-    $fname =~ s{  [-/\\:\*\?"'<>|]+ }{-}xg;
+    # also remove dots to keep VMS happy
+    $fname =~ s{  [-/\\:\*\?"'<>|.]+ }{-}xg;
      # remove any leading or trailing '-' chars
      $fname =~ s{^-}{};
      $fname =~ s{-$}{};

Modified: trunk/t/30.util.t
==============================================================================
--- trunk/t/30.util.t   (original)
+++ trunk/t/30.util.t   Thu Mar  5 06:37:52 2009
@@ -1,4 +1,4 @@
-use Test::More tests => 26;
+use Test::More tests => 27;

  use Devel::NYTProf::Util qw(
      fmt_time fmt_incl_excl_time
@@ -36,3 +36,4 @@
  is html_safe_filename('C:foo'), 'C-foo';
  is html_safe_filename('C:\foo'), 'C-foo';
  is html_safe_filename('<lots>of| 
\'really\'special*"chars"?'), 'lots-of-really-special-chars';
+is html_safe_filename('no.dots.please'), 'no-dots-please';

--~--~---------~--~----~------------~-------~--~----~
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