atom / language-perl

Perl package for Atom
Other
25 stars 32 forks source link

Support Moose highlighting #34

Open Fank opened 9 years ago

Fank commented 9 years ago

Moose add a postmodern object system for Perl 5. And bigger/larger Perl 5 packages uses Moose. @kevinsawicki Should this be added to the default Perl 5 grammar, or better add a new one "Perl 5 (Moose)" which will use the Perl 5 grammar as parent?

kevinsawicki commented 9 years ago

Should this be added to the default Perl 5 grammar, or better add a new one "Perl 5 (Moose)" which will use the Perl 5 grammar as parent?

Excuse my ignorance about perl, but does moose use a custom file extension or anything or is it common to be using moose just in any regular perl file?

Fank commented 9 years ago

It can be enabled by using them:

package Point;
use Moose; # automatically turns on strict and warnings

It's just an custom package which provides new function names, so same fileextension as Perl

Fank commented 9 years ago

Here you can see which package on CPAN (like NPM for Perl) uses Moose http://deps.cpantesters.org/depended-on-by.pl?module=Moose

kevinsawicki commented 9 years ago

Should this be added to the default Perl 5 grammar, or better add a new one "Perl 5 (Moose)" which will use the Perl 5 grammar as parent?

I think adding it to the default perl 5 grammar would be fine, how does that sound to you? We could always pull it back out into a different grammar if people find it confusing.

Fank commented 9 years ago

Yea that is a good idea