Moose/Util.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 43 CC 4 SCAR 25.1
CC
4
Cov
0%
add_moose_keywords_highlighting
20.0
BEGIN
2.0
BEGIN
2.0
CRAP 12.3
1 package Padre::Plugin::Moose::Util;
2  
3 use 5.008;
4 use strict;
5 use warnings;
6  
7 our $VERSION = '0.21';
8  
9 sub add_moose_keywords_highlighting {
10 my $type = shift or return;
11 my $document = shift or return;
12 my $editor = shift or return;
13  
14 my $keywords = Padre::Wx::Scintilla->keywords($document);
15 if ( Params::Util::_ARRAY($keywords) ) {
16 foreach my $i ( 0 .. $#$keywords ) {
17 my $keyword_list = $keywords->[$i];
18 if ( $i == 0 ) {
19 $keyword_list
20 .= ' has with extends before around after'
21 . ' override super augment inner type subtype'
22 . ' enum class_type as where coerce via from'
23 . ' requires excludes';
24 if ( $type eq 'MooseX::Declare' ) {
25 $keyword_list .= ' class role method dirty clean mutable';
26 }
27 }
28 $editor->Wx::Scintilla::TextCtrl::SetKeyWords( $i, $keyword_list );
29 }
30 }
31  
32 return;
33 }