Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the PPI CPAN distribution.

Report information
The Basics
Id: 30863
Status: resolved
Priority: 0/
Queue: PPI

People
Owner: Nobody in particular
Requestors: sjq-perl [...] jadevine.org.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.201
Fixed in: (no value)



Subject: Documentation errors
I spotted a few errors in the docs which make some of the examples a little misleading. Attached is a patch against version 1.202_01 which fixes the mistakes. Cheers, Stephen Quinney
Subject: PPI.patch
diff -ru PPI-1.202_01.orig/lib/PPI/Element.pm PPI-1.202_01/lib/PPI/Element.pm --- PPI-1.202_01.orig/lib/PPI/Element.pm 2007-11-20 03:56:26.000000000 +0000 +++ PPI-1.202_01/lib/PPI/Element.pm 2007-11-20 12:01:52.000000000 +0000 @@ -150,7 +150,7 @@ =head2 statement For a C<PPI::Element> that is contained (at some depth) within a -L<PPI::Statment>, the C<statement> method will return the first parent +L<PPI::Statement>, the C<statement> method will return the first parent Statement object lexically 'above' the Element. Returns a L<PPI::Statement> object, which may be the same Element if the diff -ru PPI-1.202_01.orig/lib/PPI.pm PPI-1.202_01/lib/PPI.pm --- PPI-1.202_01.orig/lib/PPI.pm 2007-11-20 03:56:26.000000000 +0000 +++ PPI-1.202_01/lib/PPI.pm 2007-11-20 11:57:55.000000000 +0000 @@ -536,7 +536,7 @@ PPI::Token::Comment '#!/usr/bin/perl\n' PPI::Token::Whitespace '\n' PPI::Statement::Expression - PPI::Token::Bareword 'print' + PPI::Token::Word 'print' PPI::Structure::List ( ... ) PPI::Token::Whitespace ' ' PPI::Statement::Expression @@ -546,7 +546,7 @@ PPI::Token::Whitespace '\n' PPI::Token::Whitespace '\n' PPI::Statement::Expression - PPI::Token::Bareword 'exit' + PPI::Token::Word 'exit' PPI::Structure::List ( ... ) PPI::Token::Structure ';' PPI::Token::Whitespace '\n' @@ -563,13 +563,13 @@ PPI::Document PPI::Token::Comment '#!/usr/bin/perl\n' PPI::Statement::Expression - PPI::Token::Bareword 'print' + PPI::Token::Word 'print' PPI::Structure::List ( ... ) PPI::Statement::Expression PPI::Token::Quote::Double '"Hello World!"' PPI::Token::Structure ';' PPI::Statement::Expression - PPI::Token::Bareword 'exit' + PPI::Token::Word 'exit' PPI::Structure::List ( ... ) PPI::Token::Structure ';'
The full version of the fix for this is now released to CPAN as PPI 1.218.