summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2011-02-13 14:12:08 +0000
committerdakkar <dakkar@thenautilus.net>2011-02-13 14:41:10 +0000
commit3abef1625e51eca5236f10b7f2cec9f94ab221be (patch)
tree884122d84a47f9f58cabe470c50434f35727f9a3
parentMerge branch 'class-xpath' (diff)
downloadTree-Transform-XSLTish-3abef1625e51eca5236f10b7f2cec9f94ab221be.tar.gz
Tree-Transform-XSLTish-3abef1625e51eca5236f10b7f2cec9f94ab221be.tar.bz2
Tree-Transform-XSLTish-3abef1625e51eca5236f10b7f2cec9f94ab221be.zip
prep for version 0.3HEADv0.3master
- drop MooseX::AttributeHelpers, use newer Moose instead - Tree::XPathEngine is no longer a hard dependency - minor documentation cleanup
-rw-r--r--.gitignore7
-rw-r--r--ChangeLog5
-rw-r--r--Makefile.PL5
-rw-r--r--lib/Tree/Transform/XSLTish.pm6
-rw-r--r--lib/Tree/Transform/XSLTish/Context.pm2
-rw-r--r--lib/Tree/Transform/XSLTish/Transformer.pm23
-rw-r--r--lib/Tree/Transform/XSLTish/Utils.pm2
-rw-r--r--xt/00-author-critic.t (renamed from t/00-author-critic.t)2
-rw-r--r--xt/00-author-minver.t (renamed from t/00-author-minver.t)0
-rw-r--r--xt/00-author-pod.t (renamed from t/00-author-pod.t)0
-rw-r--r--xt/perlcriticrc (renamed from t/perlcriticrc)0
11 files changed, 30 insertions, 22 deletions
diff --git a/.gitignore b/.gitignore
index 7196723..417e141 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,8 @@
-blib/
-inc/
+/blib/
+/inc/
/META.yml
/pm_to_blib
/Makefile
+/Makefile.old
+/cover_db/
+/MANIFEST \ No newline at end of file
diff --git a/ChangeLog b/ChangeLog
index 7ce649d..63688c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
.. -*- mode: rst; coding: utf-8 -*-
+0.3 2010-02-13
+ - drop MooseX::AttributeHelpers, use newer Moose instead
+ - Tree::XPathEngine is no longer a hard dependency
+ - minor documentation cleanup
+
0.2 2009-04-30
- fixed Perl::Critic tests
- fixed perl version requirement
diff --git a/Makefile.PL b/Makefile.PL
index d387a46..65e63c0 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -4,17 +4,16 @@ name 'Tree-Transform-XSLTish';
license 'perl';
all_from 'lib/Tree/Transform/XSLTish.pm';
-requires 'Tree::XPathEngine' => 0,
- 'Moose' => 0,
+requires 'Moose' => '0.90',
'Class::MOP' => 0,
'Params::Validate' => 0,
'Carp::Clan' => 0,
'Sub::Exporter' => 0,
- 'MooseX::AttributeHelpers' => 0,
'perl' => '5.6.0',
;
test_requires 'Test::Most' => 0,
+ 'Tree::XPathEngine' => 0,
'Tree::DAG_Node::XPath' => '0.10',
;
diff --git a/lib/Tree/Transform/XSLTish.pm b/lib/Tree/Transform/XSLTish.pm
index e489992..4eb047f 100644
--- a/lib/Tree/Transform/XSLTish.pm
+++ b/lib/Tree/Transform/XSLTish.pm
@@ -8,7 +8,7 @@ use Tree::Transform::XSLTish::Transformer;
use Carp::Clan qw(^Tree::Transform::XSLTish);
use 5.006;
-our $VERSION='0.2';
+our $VERSION='0.3';
my @DEFAULT_EXPORTS=('tree_rule',
'default_rules',
@@ -242,8 +242,8 @@ This function declares that the
L<Tree::Transform::XSLTish::Transformer> object returned by L</new>
should call the passed code-ref to get its engine.
-C<engine_class $classname> is equivalent to C<engine_factory {
-$classname->new }>.
+C<engine_class $classname> is equivalent to C<< engine_factory {
+$classname->new } >>.
This function is not exported by default: you have to use the module as:
diff --git a/lib/Tree/Transform/XSLTish/Context.pm b/lib/Tree/Transform/XSLTish/Context.pm
index bb7c9de..9ef7062 100644
--- a/lib/Tree/Transform/XSLTish/Context.pm
+++ b/lib/Tree/Transform/XSLTish/Context.pm
@@ -2,7 +2,7 @@ package Tree::Transform::XSLTish::Context;
use Moose;
use Carp::Clan qw(^Tree::Transform::XSLTish);
-our $VERSION='0.2';
+our $VERSION='0.3';
has 'current_node' => ( is => 'rw', isa => 'Object' );
has 'node_list' => ( is => 'rw', isa => 'ArrayRef[Object]' );
diff --git a/lib/Tree/Transform/XSLTish/Transformer.pm b/lib/Tree/Transform/XSLTish/Transformer.pm
index d5ad6ec..16e27bd 100644
--- a/lib/Tree/Transform/XSLTish/Transformer.pm
+++ b/lib/Tree/Transform/XSLTish/Transformer.pm
@@ -1,14 +1,11 @@
package Tree::Transform::XSLTish::Transformer;
use Moose;
-use MooseX::AttributeHelpers;
use Moose::Util::TypeConstraints;
-use Params::Validate ':all';
use Tree::Transform::XSLTish::Utils;
use Tree::Transform::XSLTish::Context;
-use Tree::XPathEngine;
use Carp::Clan qw(^Tree::Transform::XSLTish);
-our $VERSION='0.2';
+our $VERSION='0.3';
subtype 'Tree::Transform::XSLTish::Engine'
=> as 'Object'
@@ -19,18 +16,19 @@ subtype 'Tree::Transform::XSLTish::Engine'
has 'rules_package' => (is => 'ro', isa => 'ClassName');
has 'context_stack' => (
- metaclass => 'Collection::Array',
+ traits => ['Array'],
is => 'rw',
isa => 'ArrayRef[Tree::Transform::XSLTish::Context]',
default => sub { [] },
- provides => {
- last => 'context',
- push => 'enter',
- pop => 'leave',
- empty => 'has_context',
+ handles => {
+ enter => 'push',
+ leave => 'pop',
+ has_context => 'count',
},
);
+sub context { return $_[0]->context_stack->[-1] }
+
has 'engine' => (
is => 'ro',
isa => 'Tree::Transform::XSLTish::Engine',
@@ -47,6 +45,7 @@ sub _build_engine {
return $factory->();
}
}
+ require Tree::XPathEngine;
return Tree::XPathEngine->new();
}
@@ -164,6 +163,8 @@ sub find_rule_by_name_in_package {
if (exists $rules->{$name}) {
return $rules->{$name};
}
+
+ return;
}
sub rule_matches {
@@ -296,7 +297,7 @@ L<find_rule_in_package> and returns the first defined result.
=head2 C<find_rule_in_package>
Gets all the rules having a C<match> attribute, filters those for
-which L<rule_matches> returns true, sorts them priority, and returns
+which L<rule_matches> returns true, sorts them by priority, and returns
the one with the highest priority.
Dies if there is more than one rule with the highest priority; returns
diff --git a/lib/Tree/Transform/XSLTish/Utils.pm b/lib/Tree/Transform/XSLTish/Utils.pm
index c760585..77746d8 100644
--- a/lib/Tree/Transform/XSLTish/Utils.pm
+++ b/lib/Tree/Transform/XSLTish/Utils.pm
@@ -3,7 +3,7 @@ use strict;
use warnings;
use Class::MOP;
-our $VERSION='0.2';
+our $VERSION='0.3';
my $RULES_NAME='%_tree_transform_rules';
diff --git a/t/00-author-critic.t b/xt/00-author-critic.t
index 79ed2b7..13fe8e7 100644
--- a/t/00-author-critic.t
+++ b/xt/00-author-critic.t
@@ -28,7 +28,7 @@ foreach my $MODULE ( @MODULES ) {
: plan( skip_all => "$MODULE not available for testing" );
}
}
-my $rcfile = File::Spec->catfile( 't', 'perlcriticrc' );
+my $rcfile = File::Spec->catfile( 'xt', 'perlcriticrc' );
Test::Perl::Critic->import( -profile => $rcfile );
all_critic_ok();
diff --git a/t/00-author-minver.t b/xt/00-author-minver.t
index 4dfb876..4dfb876 100644
--- a/t/00-author-minver.t
+++ b/xt/00-author-minver.t
diff --git a/t/00-author-pod.t b/xt/00-author-pod.t
index 2cdfcc4..2cdfcc4 100644
--- a/t/00-author-pod.t
+++ b/xt/00-author-pod.t
diff --git a/t/perlcriticrc b/xt/perlcriticrc
index 8503255..8503255 100644
--- a/t/perlcriticrc
+++ b/xt/perlcriticrc