22 Nov 2013 21:38:15 UTC
- Distribution: Devel-PerlySense
- Module version: 0.0209
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (5)
- Testers (229 / 1 / 0)
- KwaliteeBus factor: 1
- License: perl_5
- Activity24 month
- Download (422.49KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- KNOWN MOOSE BUGS
- KNOWN BUGS
- API METHODS
- COPYRIGHT & LICENSE
Devel::PerlySense::Plugin::Syntax::Moose - Plugin for parsing Moose syntax constructs
Parses Moose specific syntax, like the "extends" keyword.
has - Attributes
Treated as subs (getters/setters).
Multiple attributes and overridden attributes are supported.
extends - Inheritance
Single and multiple inheritance supported.
with - Roles
Treated as base classes.
Broken Moose code, e.g. multiple extends are parsed incorrectly (the ISA isn't reset). But you shouldn't have broken Moose code should you?
Roles are treated like base classes, because that's the most similar Perl concept.
Some parts of the parsing is a bit sloppy and fragile, e.g. comments in lists may be picked up.
This plugin module is not yet it's own distribution, which it should be. It should have a base class inside the PerlySense distro to future proof both PerlySense's and the plugins' APIs against each other.
The plugins could have some kind of marker for when they should be run for a document. It could be a quick regex on the source or per line or something.
Reporting back to PerlySense isn't quite uniform yet in that most things are set in a hash ref, but sub location are set on the Meta object. That should be fixed.
Parse the Devel::PerlySense::Document and extract metadata. Fill appropriate data structures.
the key e.g. "Moose" for Plugin::Syntax::Moose, is for the plugin to manage. It's persistent during the complete parse of a document.
Return 1 or die on errors.
Please report any bugs or feature requests to
firstname.lastname@example.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Devel-PerlySense. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
Copyright 2005 Johan Lindstr�m, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Devel::PerlySense, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Devel::PerlySense
For more information on module installation, please visit the detailed CPAN module installation guide.