Skip to content
Browse files

Breakpoint.pm: remove duplicate code and possibly deal with a failing…

… "find_subline". Is it Build.PL ok to drop Version dependency that smokers erroniously suggested we needed? Bump version.
  • Loading branch information...
1 parent 9d1b3fa commit d23516ff8fe2e0f1aaeec8b5b5819663a9ba0c31 Rocky Bernstein committed Sep 27, 2012
Showing with 25 additions and 37 deletions.
  1. +0 −1 Build.PL
  2. +16 −12 META.json
  3. +6 −3 META.yml
  4. +2 −20 lib/Devel/Trepan/DB/Breakpoint.pm
  5. +1 −1 lib/Devel/Trepan/Version.pm
View
1 Build.PL
@@ -74,7 +74,6 @@ my $builder = Module::Build->new(
# 'Capture::Tiny' => 0,
'Data::Dumper' => 0,
'Getopt::Long' => '2.36',
- 'Devel::Trepan::Version' => 0,
'Digest::SHA' => 0,
'PadWalker' => 0,
'Pod::Text' => 3.13,
View
28 META.json
@@ -4,7 +4,7 @@
"Rocky Bernstein <rocky@cpan.org>"
],
"dynamic_config" : 1,
- "generated_by" : "Module::Build version 0.4, CPAN::Meta::Converter version 2.120921",
+ "generated_by" : "Module::Build version 0.4, CPAN::Meta::Converter version 2.112150",
"license" : [
"open_source"
],
@@ -21,24 +21,24 @@
},
"runtime" : {
"recommends" : {
- "Data::Printer" : "0",
+ "Data::Printer" : 0,
"Devel::Callsite" : "0.05",
- "Eval::WithLexicals" : "0",
+ "Eval::WithLexicals" : 0,
"Pod::Text::Color" : "2.06",
- "Term::ReadKey" : "0",
- "Term::ReadLine::Perl" : "0"
+ "Term::ReadKey" : 0,
+ "Term::ReadLine::Perl" : 0
},
"requires" : {
"Array::Columnize" : "1.01",
- "Data::Dumper" : "0",
- "Digest::SHA" : "0",
+ "Data::Dumper" : 0,
+ "Digest::SHA" : 0,
"Getopt::Long" : "2.36",
- "PadWalker" : "0",
+ "PadWalker" : 0,
"Pod::Text" : "3.13",
"Syntax::Highlight::Perl::Improved" : "1.01",
"perl" : "5.008008",
"rlib" : "0.02",
- "version" : "0"
+ "version" : 0
}
}
},
@@ -57,7 +57,7 @@
},
"Devel::Trepan" : {
"file" : "lib/Devel/Trepan.pm",
- "version" : 0
+ "version" : "0.43"
},
"Devel::Trepan::BrkptMgr" : {
"file" : "lib/Devel/Trepan/BrkptMgr.pm",
@@ -655,6 +655,10 @@
"file" : "lib/Devel/Trepan/Util.pm",
"version" : 0
},
+ "Devel::Trepan::Version" : {
+ "file" : "lib/Devel/Trepan/Version.pm",
+ "version" : "0.44_01"
+ },
"Devel::Trepan::WatchMgr" : {
"file" : "lib/Devel/Trepan/WatchMgr.pm",
"version" : 0
@@ -668,7 +672,7 @@
"version" : 0
}
},
- "release_status" : "stable",
+ "release_status" : "testing",
"resources" : {
"bugtracker" : {
"web" : "https://github.com/rocky/Perl-Devel-Trepan/issues"
@@ -680,5 +684,5 @@
"url" : "http://github.com/rocky/Perl-Devel-Trepan"
}
},
- "version" : "0.43"
+ "version" : "0.44_01"
}
View
9 META.yml
@@ -6,7 +6,7 @@ build_requires: {}
configure_requires:
Module::Build: 0.32
dynamic_config: 1
-generated_by: 'Module::Build version 0.4, CPAN::Meta::Converter version 2.120921'
+generated_by: 'Module::Build version 0.4, CPAN::Meta::Converter version 2.112150'
license: open_source
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -24,7 +24,7 @@ provides:
version: 0
Devel::Trepan:
file: lib/Devel/Trepan.pm
- version: 0
+ version: 0.43
Devel::Trepan::BrkptMgr:
file: lib/Devel/Trepan/BrkptMgr.pm
version: 0
@@ -472,6 +472,9 @@ provides:
Devel::Trepan::Util:
file: lib/Devel/Trepan/Util.pm
version: 0
+ Devel::Trepan::Version:
+ file: lib/Devel/Trepan/Version.pm
+ version: 0.44_01
Devel::Trepan::WatchMgr:
file: lib/Devel/Trepan/WatchMgr.pm
version: 0
@@ -503,4 +506,4 @@ resources:
bugtracker: https://github.com/rocky/Perl-Devel-Trepan/issues
license: http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt
repository: http://github.com/rocky/Perl-Devel-Trepan
-version: 0.43
+version: 0.44_01
View
22 lib/Devel/Trepan/DB/Breakpoint.pm
@@ -78,32 +78,14 @@ sub find_subline($) {
my($filename, $from, $to) = ($DB::sub{$fn_name} =~ /^(.*):(\d+)-(\d+)$/);
if ($from) {
local *DB::dbline = "::_<$filename";
- ++$from while $DB::dbline[$from] == 0 && $from < $to;
+ ++$from while $DB::dbline[$from] && $DB::dbline[$from] == 0 &&
+ $from < $to;
return ($filename, $fn_name, $from);
}
}
return (undef, undef, undef);
}
-# Find a subroutine line.
-# FIXME: reorganize things to really set a breakpoint at a subroutine.
-# not just the line number we that we might find subroutine on.
-sub _find_subline {
- my $name = shift;
- $name =~ s/\'/::/;
- $name = "${DB::package}\:\:" . $name if $name !~ /::/;
- $name = "main" . $name if substr($name,0,2) eq "::";
- if (exists $DB::sub{$name}) {
- my($fname, $from, $to) = ($DB::sub{$name} =~ /^(.*):(\d+)-(\d+)$/);
- if ($from) {
- local *DB::dbline = "::_<$fname";
- ++$from while $DB::dbline[$from] == 0 && $from < $to;
- return $from;
- }
- }
- return undef;
-}
-
# Return a warning message if breakpoint position is invalid.
# undef is returned if the breakpont is valid.
sub break_invalid {
View
2 lib/Devel/Trepan/Version.pm
@@ -1,3 +1,3 @@
package Devel::Trepan::Version;
-use version; $VERSION = '0.44';
+use version; $VERSION = '0.44_01';
1;

0 comments on commit d23516f

Please sign in to comment.
Something went wrong with that request. Please try again.