The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Padre::Document::Perl::Beginner - naive implementation of some beginner specific error checking

SYNOPSIS

  use Padre::Document::Perl::Beginner;
  my $b = Padre::Document::Perl::Beginner->new;
  if (not $b->check($data)) {
      warn $b->error;
  }

DESCRIPTION

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.

Examples

  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

Copyright 2008 Gabor Szabo. http://www.szabgab.com/

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.

WARRANTY

There is no warranty whatsoever.