please accept this request , what is typo fixed #1

Merged
merged 1 commit into from Apr 22, 2011
View
@@ -8,7 +8,7 @@ our $VERSION = '0.01';
my $applicant = 'Encomp::Class::Encompasser';
-setup_suger_features
+setup_sugar_features
applicant_isa => $applicant,
as_is => [qw/processes incorporate/],
specific_ns => 'Encomp::Specific',
@@ -21,12 +21,12 @@ setup_suger_features
/],
;
-suger_feature processes => sub {
+sugar_feature processes => sub {
my $class = shift;
$class->node->append_nodes(@_);
};
-suger_feature incorporate => sub {
+sugar_feature incorporate => sub {
my $class = shift;
my $plugin = shift;
Encomp::Util::load_class($plugin);
View
@@ -6,7 +6,7 @@ use Encomp::Meta::Composite;
use Encomp::Util;
use List::MoreUtils qw/uniq/;
-setup_suger_features
+setup_sugar_features
metadata => { composite => sub { Encomp::Meta::Composite->new(@_) } };
sub conflate {
View
@@ -3,7 +3,7 @@ package Encomp::Controller;
use Encomp::Exporter;
use parent qw/Encomp::Base/;
-setup_suger_features
+setup_sugar_features
applicant_isa => 'Encomp::Class::Controller',
specific_ns => 'Encomp::Specific',
specific_with => [qw/
View
@@ -5,7 +5,7 @@ use parent qw/Exporter/;
use Encomp::Exporter::Spec;
use Carp qw/croak/;
-our @EXPORT = qw/setup_suger_features suger_feature/;
+our @EXPORT = qw/setup_sugar_features sugar_feature/;
sub import {
my ($class) = @_;
@@ -14,7 +14,7 @@ sub import {
$class->export_to_level(1, @_);
}
-sub setup_suger_features {
+sub setup_sugar_features {
my $caller = caller;
croak 'This function should not be called from main' if $caller eq 'main';
Encomp::Exporter::Spec::build_spec($caller, @_);
@@ -27,7 +27,7 @@ sub setup_suger_features {
our $CALLER;
-sub suger_feature {
+sub sugar_feature {
my ($name, $code) = @_;
my $caller = caller;
my $wrap = sub {
View
@@ -3,7 +3,7 @@ package Encomp::Plugin;
use Encomp::Exporter;
use parent qw/Encomp::Base/;
-setup_suger_features
+setup_sugar_features
applicant_isa => 'Encomp::Class::Plugin',
specific_ns => 'Encomp::Specific',
specific_with => [qw/
@@ -8,9 +8,9 @@ use Carp qw/croak/;
use Encomp::Util;
use Storable qw/dclone/;
-setup_suger_features as_is => [qw/accessor/];
+setup_sugar_features as_is => [qw/accessor/];
-suger_feature accessor => sub {
+sugar_feature accessor => sub {
my $class = shift;
_make_accessor($class, @_);
};
@@ -6,9 +6,9 @@ use Encomp::Exporter;
use Carp qw/carp croak/;
-setup_suger_features as_is => [qw/class_accessor/];
+setup_sugar_features as_is => [qw/class_accessor/];
-suger_feature class_accessor => sub {
+sugar_feature class_accessor => sub {
my $class = shift;
_make_class_accessor($class, @_);
};
@@ -7,9 +7,9 @@ use File::Spec;
use Hash::Merge;
use YAML::Any ();
-setup_suger_features as_is => [qw/config/];
+setup_sugar_features as_is => [qw/config/];
-suger_feature config => sub {
+sugar_feature config => sub {
my $class = shift;
my $stash = $class->composite->stash->{config} ||= {};
my $config = 1 == @_ ? shift : +{ @_ };
@@ -4,7 +4,7 @@ use Encomp::Exporter;
use parent qw/Encomp::Specific::Plugin/;
use Carp qw/confess/;
-setup_suger_features
+setup_sugar_features
as_is => [qw/duck_type/],
setup => sub {
my $complex = shift;
@@ -29,7 +29,7 @@ setup_suger_features
},
;
-suger_feature duck_type => sub {
+sugar_feature duck_type => sub {
my $class = shift;
my $stash = $class->composite->stash->{duck_type} ||= {};
@{$stash}{@_} = map { $class } @_;
@@ -3,7 +3,7 @@ package Encomp::Specific::Hook;
use Encomp::Exporter;
use parent qw/Encomp::Base/;
-setup_suger_features
+setup_sugar_features
as_is => [qw/hook_to/],
setup => sub {
my $complex = shift;
@@ -18,7 +18,7 @@ setup_suger_features
},
;
-suger_feature hook_to => sub {
+sugar_feature hook_to => sub {
my $class = shift;
$class->composite->add_hook(@_);
};
@@ -5,7 +5,7 @@ use parent qw/Encomp::Base/;
use Carp qw/croak confess/;
use Encomp::Util;
-setup_suger_features
+setup_sugar_features
as_is => [qw/plugins plugout +AUTOLOAD/],
setup => sub {
my $complex = shift;
@@ -15,13 +15,13 @@ setup_suger_features
},
;
-suger_feature plugins => sub {
+sugar_feature plugins => sub {
my $class = shift;
my @plugins = ref $_[0] ? @{$_[0]} : @_;
$class->composite->add_plugins(@plugins);
};
-suger_feature plugout => sub {
+sugar_feature plugout => sub {
my $class = shift;
my @plugins = ref $_[0] ? @{$_[0]} : @_;
$class->composite->add_plugout(@plugins);
@@ -4,7 +4,7 @@ use Encomp::Exporter;
use parent qw/Encomp::Base/;
use Carp qw/croak confess/;
-setup_suger_features
+setup_sugar_features
as_is => [qw/modify_process/],
setup => sub {
my $complex = shift;
@@ -17,7 +17,7 @@ setup_suger_features
},
;
-suger_feature modify_process => sub {
+sugar_feature modify_process => sub {
my $class = shift;
my $stash = $class->composite->stash->{process_modifiers} ||= [];
while (my ($type, $modifier) = splice @_, 0, 2) {
View
@@ -7,13 +7,13 @@ use Test::More 'no_plan';
use Encomp::Exporter;
- setup_suger_features
+ setup_sugar_features
applicant_isa => __PACKAGE__ . '::Object',
- as_is => [qw/foo suger/],
+ as_is => [qw/foo sugar/],
;
sub foo {}
- sub suger { __PACKAGE__ }
+ sub sugar { __PACKAGE__ }
package Foo::Object;
@@ -27,14 +27,14 @@ use Test::More 'no_plan';
use Encomp::Exporter;
- setup_suger_features
+ setup_sugar_features
applicant_isa => __PACKAGE__ . '::Object',
- as_is => [qw/bar suger/],
+ as_is => [qw/bar sugar/],
specific_with => [qw/Qux/],
;
sub bar {}
- sub suger { __PACKAGE__ }
+ sub sugar { __PACKAGE__ }
package Bar::Object;
@@ -48,13 +48,13 @@ use Test::More 'no_plan';
use Encomp::Exporter;
- setup_suger_features
+ setup_sugar_features
applicant_isa => __PACKAGE__ . '::Object',
- as_is => [qw/baz suger/],
+ as_is => [qw/baz sugar/],
;
sub baz {}
- sub suger { __PACKAGE__ }
+ sub sugar { __PACKAGE__ }
package Baz::Object;
@@ -64,7 +64,7 @@ use Test::More 'no_plan';
use Encomp::Exporter;
- setup_suger_features
+ setup_sugar_features
as_is => [qw/qux/],
;
@@ -76,16 +76,16 @@ package Test::Foo;
Foo->import; #::diag 'use Foo;';
::can_ok 'Test::Foo', 'foo';
-::can_ok 'Test::Foo', 'suger';
+::can_ok 'Test::Foo', 'sugar';
::ok ! Test::Foo->can('bar'), 'Test::Foo->can\'t(\'bar\')' ;
::ok ! Test::Foo->can('baz'), 'Test::Foo->can\'t(\'baz\')' ;
-::is +Test::Foo->suger, 'Foo', 'suger is \'Foo\'';
+::is +Test::Foo->sugar, 'Foo', 'sugar is \'Foo\'';
Foo->unimport; #::diag 'no Foo;';
::ok ! Test::Foo->can('foo'), 'Test::Foo->can\'t(\'foo\')';
-::ok ! Test::Foo->can('suger'), 'Test::Foo->can\'t(\'suger\')';
+::ok ! Test::Foo->can('sugar'), 'Test::Foo->can\'t(\'sugar\')';
::is +Test::Foo->me, 'Foo::Object';
@@ -98,17 +98,17 @@ Bar->import; #::diag 'use Bar;';
::can_ok 'Test::Bar', 'foo';
::can_ok 'Test::Bar', 'bar';
::can_ok 'Test::Bar', 'qux';
-::can_ok 'Test::Bar', 'suger';
+::can_ok 'Test::Bar', 'sugar';
::ok ! Test::Bar->can('baz'), 'Test::Bar->can\'t(\'baz\')' ;
-::is +Test::Bar->suger, 'Bar', 'suger is \'Bar\'(The method of doing override becomes effective)';
+::is +Test::Bar->sugar, 'Bar', 'sugar is \'Bar\'(The method of doing override becomes effective)';
Bar->unimport; #::diag 'no Bar;';
::ok ! Test::Bar->can('foo'), 'Test::Bar->can\'t(\'foo\')';
::ok ! Test::Bar->can('bar'), 'Test::Bar->can\'t(\'bar\')' ;
::ok ! Test::Bar->can('qux'), 'Test::Bar->can\'t(\'qux\')' ;
-::ok ! Test::Bar->can('suger'), 'Test::Bar->can\'t(\'suger\')';
+::ok ! Test::Bar->can('sugar'), 'Test::Bar->can\'t(\'sugar\')';
::is +Test::Bar->me, 'Bar::Object';
@@ -122,17 +122,17 @@ Baz->import; #::diag 'use Baz;';
::can_ok 'Test::Baz', 'bar';
::can_ok 'Test::Baz', 'qux';
::can_ok 'Test::Baz', 'baz';
-::can_ok 'Test::Baz', 'suger';
+::can_ok 'Test::Baz', 'sugar';
-::is +Test::Baz->suger, 'Baz', 'suger is \'Baz\'(The method of doing override becomes effective)';
+::is +Test::Baz->sugar, 'Baz', 'sugar is \'Baz\'(The method of doing override becomes effective)';
Baz->unimport; #::diag 'no Baz;';
::ok ! Test::Baz->can('foo'), 'Test::Baz->can\'t(\'foo\')';
::ok ! Test::Baz->can('bar'), 'Test::Baz->can\'t(\'bar\')' ;
::ok ! Test::Baz->can('qux'), 'Test::Baz->can\'t(\'qux\')' ;
::ok ! Test::Baz->can('baz'), 'Test::Baz->can\'t(\'baz\')' ;
-::ok ! Test::Baz->can('suger'), 'Test::Baz->can\'t(\'suger\')';
+::ok ! Test::Baz->can('sugar'), 'Test::Baz->can\'t(\'sugar\')';
::is +Test::Baz->me, 'Baz::Object';
@@ -3,7 +3,7 @@ package DemoFW::Controller;
use Encomp::Exporter;
use base qw/Encomp::Controller/;
-setup_suger_features;
+setup_sugar_features;
1;
View
@@ -3,7 +3,7 @@ package DemoFW::Plugin;
use Encomp::Exporter;
use base qw/Encomp::Plugin/;
-setup_suger_features;
+setup_sugar_features;
1;