[Bast-commits] r5070 -
Devel-Declare/1.000/trunk/lib/Devel/Declare/Context
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Fri Nov 7 06:51:47 GMT 2008
Author: rafl
Date: 2008-11-07 06:51:47 +0000 (Fri, 07 Nov 2008)
New Revision: 5070
Modified:
Devel-Declare/1.000/trunk/lib/Devel/Declare/Context/Simple.pm
Log:
Add strip_indent to Ctx::Simple.
Modified: Devel-Declare/1.000/trunk/lib/Devel/Declare/Context/Simple.pm
===================================================================
--- Devel-Declare/1.000/trunk/lib/Devel/Declare/Context/Simple.pm 2008-11-07 06:51:40 UTC (rev 5069)
+++ Devel-Declare/1.000/trunk/lib/Devel/Declare/Context/Simple.pm 2008-11-07 06:51:47 UTC (rev 5070)
@@ -68,6 +68,21 @@
return;
}
+sub strip_ident {
+ my $self = shift;
+ $self->skipspace;
+ if (my $len = Devel::Declare::toke_scan_ident( $self->offset )) {
+ my $linestr = $self->get_linestr();
+ my $ident = substr( $linestr, $self->offset, $len );
+ substr( $linestr, $self->offset, $len ) = '';
+ $self->set_linestr($linestr);
+ return $ident;
+ }
+
+ $self->skipspace;
+ return;
+}
+
sub strip_proto {
my $self = shift;
$self->skipspace;
More information about the Bast-commits
mailing list