Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Optionally export FIRST_UNUSED so subclasses know where in @$self to …

…start.
  • Loading branch information...
commit cb4f65f0aefdf7ed7b22d5db8ea8f0773f47d41b 1 parent f7f761c
@rcaputo authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 lib/POE/Filter/Line.pm
View
11 lib/POE/Filter/Line.pm
@@ -15,11 +15,15 @@ sub FRAMING_BUFFER () { 0 }
sub INPUT_REGEXP () { 1 }
sub OUTPUT_LITERAL () { 2 }
sub AUTODETECT_STATE () { 3 }
+sub FIRST_UNUSED () { 4 } # First unused $self offset.
sub AUTO_STATE_DONE () { 0x00 }
sub AUTO_STATE_FIRST () { 0x01 }
sub AUTO_STATE_SECOND () { 0x02 }
+use base 'Exporter';
+our @EXPORT_OK = qw( FIRST_UNUSED );
+
#------------------------------------------------------------------------------
sub new {
@@ -337,6 +341,13 @@ the paragraph separator is "---" on a line by itself.
POE::Filter::Line has no additional public methods.
+=head1 SUBCLASSING
+
+POE::Filter::Line exports the FIRST_UNUSED constant. This points to
+the first unused element in the $self array reference. Subclasses
+should store their own data beginning here, and they should export
+their own FIRST_UNUSED constants to help future subclassers.
+
=head1 SEE ALSO
Please see L<POE::Filter> for documentation regarding the base
Please sign in to comment.
Something went wrong with that request. Please try again.