Padre::Document::Perl::Beginner - naive implementation of some beginner specific error checking
use Padre::Document::Perl::Beginner; my $b = Padre::Document::Perl::Beginner->new; if (not $b->check($data)) { warn $b->error; }
This is a naive implementation. It needs to be replaces by one using PPI.
In Perl 5 there are lots of pitfals the unaware, especially the beginner can easily fall in. This module provides a method called check that can check a perl script (provided as parameter as a single string) and recognize problematic code.
check
split /,/, @data;
Here @data is in scalar context returning the number of elemenets. Spotted in this form:
split /,/, @ARGV;
See http://padre.perlide.org/ticket/52 and http://www.perlmonks.org/?node_id=728569
Copyright 2008-2009 The Padre development team as listed in Padre.pm.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.
There is no warranty whatsoever.
To install Padre, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Padre
CPAN shell
perl -MCPAN -e shell install Padre
For more information on module installation, please visit the detailed CPAN module installation guide.