[Bps-public-commit] r17756 - in String-BufferStack: . t

alexmv at bestpractical.com alexmv at bestpractical.com
Thu Jan 15 23:38:57 EST 2009


Author: alexmv
Date: Thu Jan 15 23:38:56 2009
New Revision: 17756

Removed:
   String-BufferStack/t/05-data.t
Modified:
   String-BufferStack/   (props changed)
   String-BufferStack/lib/String/BufferStack.pm

Log:
 r41017 at kohr-ah:  chmrr | 2009-01-15 16:31:49 -0500
 Rip out data


Modified: String-BufferStack/lib/String/BufferStack.pm
==============================================================================
--- String-BufferStack/lib/String/BufferStack.pm	(original)
+++ String-BufferStack/lib/String/BufferStack.pm	Thu Jan 15 23:38:56 2009
@@ -54,7 +54,6 @@
     $output = '';
     return bless {
         stack => [],
-        data_stack => [],
         top => undef,
         output => \$output,
         out_method => $args{out_method} || sub { print STDOUT @_ },
@@ -114,13 +113,6 @@
 popped.  They can be forced at any time by calling L</flush_filters>,
 however.
 
-=item data
-
-Arbitrary data associated with this stack frame.
-C<String::BufferStack> does not inspect this or rely on it in any way,
-besides tracking it.  See also L</data>, L</data_ref>, and
-L</data_depth>.
-
 =back
 
 =cut
@@ -131,7 +123,6 @@
         buffer => $self->{top} ? $self->{top}{pre_filter} : $self->{output},
         pre_append => undef,
         filter => undef,
-        data => undef,
         @_
     };
     my $filter = "";
@@ -143,7 +134,6 @@
     local $self->{local_frame} = $frame;
     $self->set_pre_append(delete $frame->{pre_append}) if exists $frame->{pre_append};
     CORE::push(@{$self->{stack}}, $frame);
-    CORE::push(@{$self->{data_stack}}, $frame->{data}) if $frame->{data};
 }
 
 =head2 depth
@@ -228,7 +218,6 @@
     return unless $self->{top};
     $self->filter;
     my $frame = CORE::pop(@{$self->{stack}});
-    CORE::pop(@{$self->{data_stack}}) if $frame->{data};
     local $self->{local_frame} = $frame;
     $self->set_pre_append(undef);
     $self->{top} = @{$self->{stack}} ? $self->{stack}[-1] : undef;
@@ -446,41 +435,4 @@
     return $self->{out_method};
 }
 
-=head2 data [INDEX]
-
-With no arguments, returns the topmost defined C<data> argument to
-L</push>.  With C<INDEX> provided, indexes into the array of defined
-C<data> elements, -1 being the most recent, 0 being the first.
-
-=cut
-
-sub data {
-    my $self = shift;
-    my $i = @_ ? shift : -1;
-    return $self->{data_stack}[$i];
-}
-
-=head2 data_depth
-
-Returns the number of data elements in the stack.
-
-=cut
-
-sub data_depth {
-    my $self = shift;
-    return scalar @{$self->{data_stack}};
-}
-
-=head2 data_ref
-
-Returns a reference to the data stack, allowing it to be arbitrarily
-manipulated.
-
-=cut
-
-sub data_ref {
-    my $self = shift;
-    return $self->{data_stack};
-}
-
 1;



More information about the Bps-public-commit mailing list