Permalink
Browse files

Add a debugging module for Andy and my use

  • Loading branch information...
1 parent 9ee318a commit 20d71f657ae3e53e38cdcfa4718e9245a4e0d06d @hoelzro hoelzro committed Jun 11, 2012
Showing with 23 additions and 0 deletions.
  1. +22 −0 Debug.pm
  2. +1 −0 Makefile.PL
View
@@ -0,0 +1,22 @@
+## no critic (RequireUseStrict)
+package App::Ack::Debug;
+
+## use critic (RequireUseStrict)
+use strict;
+use warnings;
+use parent 'Exporter';
+
+our @EXPORT = qw(debug_print);
+
+my $tty;
+open $tty, '>', '/dev/tty';
+
+sub debug_print {
+ my ( @args ) = @_;
+
+ local $\ = "\n";
+
+ print { $tty } @args;
+}
+
+1;
View
@@ -20,6 +20,7 @@ my %parms = (
'Basic.pm' => '$(INST_LIBDIR)/App/Ack/Resource/Basic.pm',
'ConfigFinder.pm' => '$(INST_LIBDIR)/App/Ack/ConfigFinder.pm',
'ConfigLoader.pm' => '$(INST_LIBDIR)/App/Ack/ConfigLoader.pm',
+ 'Debug.pm' => '$(INST_LIBDIR)/App/Ack/Debug.pm',
'Filter.pm' => '$(INST_LIBDIR)/App/Ack/Filter.pm',
'Extension.pm' => '$(INST_LIBDIR)/App/Ack/Filter/Extension.pm',
'FirstLineMatch.pm' => '$(INST_LIBDIR)/App/Ack/Filter/FirstLineMatch.pm',

0 comments on commit 20d71f6

Please sign in to comment.