New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
B::Section should be removed from the Perl source code #14957
Comments
From @toddrCreated by @toddrWhen B::C was removed from sources in de12544, it was missed According to http://grep.cpan.me/?q=B%3A%3ASection, the module is only 1. B::C in it's current CPAN state does not function on blead. For these reasons, I suggest removal of the code from blead. I'll Perl Info
|
From @toddrSuggested change attached. |
From @toddr0001-Remove-B-Section-from-B.pm.patchFrom c66681e70ce13124df7a8247abd31bd5826702ff Mon Sep 17 00:00:00 2001
From: Todd Rinaldo <toddr@cpan.org>
Date: Thu, 1 Oct 2015 18:05:49 -0500
Subject: [PATCH] Remove B::Section from B.pm
This package is a vestigial reminant of B::C's removal
in de1254415ffeb03b so is safe to be removed.
---
ext/B/B.pm | 66 --------------------------------------------------------------
1 file changed, 66 deletions(-)
diff --git a/ext/B/B.pm b/ext/B/B.pm
index 706e19a..bb5b71a 100644
--- a/ext/B/B.pm
+++ b/ext/B/B.pm
@@ -274,72 +274,6 @@ sub walksymtable {
}
}
-{
- package B::Section;
- my $output_fh;
- my %sections;
-
- sub new {
- my ($class, $section, $symtable, $default) = @_;
- $output_fh ||= FileHandle->new_tmpfile;
- my $obj = bless [-1, $section, $symtable, $default], $class;
- $sections{$section} = $obj;
- return $obj;
- }
-
- sub get {
- my ($class, $section) = @_;
- return $sections{$section};
- }
-
- sub add {
- my $section = shift;
- while (defined($_ = shift)) {
- print $output_fh "$section->[1]\t$_\n";
- $section->[0]++;
- }
- }
-
- sub index {
- my $section = shift;
- return $section->[0];
- }
-
- sub name {
- my $section = shift;
- return $section->[1];
- }
-
- sub symtable {
- my $section = shift;
- return $section->[2];
- }
-
- sub default {
- my $section = shift;
- return $section->[3];
- }
-
- sub output {
- my ($section, $fh, $format) = @_;
- my $name = $section->name;
- my $sym = $section->symtable || {};
- my $default = $section->default;
-
- seek($output_fh, 0, 0);
- while (<$output_fh>) {
- chomp;
- s/^(.*?)\t//;
- if ($1 eq $name) {
- s{(s\\_[0-9a-f]+)} {
- exists($sym->{$1}) ? $sym->{$1} : $default;
- }ge;
- printf $fh $format, $_;
- }
- }
- }
-}
-
1;
__END__
--
2.5.0
|
From @toddrWith the commit applied to B::C listed below, there is now officially no code I can find now or in the future that uses B::Section. I'm not aware of a reason to keep it at this point so the patch should be good to merge as is. |
From @jkeenanOn Wed Nov 18 12:12:43 2015, TODDR wrote:
Smoking in this branch: smoke-me/jkeenan/trinaldo/126244-remove-b-section -- |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Wed, Dec 02, 2015 at 05:39:05PM -0800, James E Keenan via RT wrote:
Now pushed to blead as 88e8953 -- |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#126244 (status was 'resolved')
Searchable as RT126244$
The text was updated successfully, but these errors were encountered: