Skip to content
Browse files

rename services back and use _services

  • Loading branch information...
1 parent fbbe4c5 commit 3a23a0e751303d18fddd6e4780121f39faed4eb8 @miyagawa committed Dec 12, 2009
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/Tatsumaki/Application.pm
View
12 lib/Tatsumaki/Application.pm
@@ -14,7 +14,7 @@ has _rules => (is => 'rw', isa => 'ArrayRef');
has template => (is => 'rw', isa => 'Tatsumaki::Template', lazy_build => 1, handles => [ 'render_file' ]);
has static_path => (is => 'rw', isa => 'Str', default => 'static');
-has services => (is => 'rw', isa => 'HashRef', default => sub { +{} });
+has _services => (is => 'rw', isa => 'HashRef', default => sub { +{} });
around BUILDARGS => sub {
my $orig = shift;
@@ -115,17 +115,17 @@ sub add_service {
$service->application($self);
$service->start;
- $self->services->{$name} = $service;
+ $self->_services->{$name} = $service;
}
sub service {
my($self, $name) = @_;
- $self->services->{$name};
+ $self->_services->{$name};
}
-sub all_services {
+sub services {
my $self = shift;
- values %{$self->services};
+ values %{$self->_services};
}
sub _service_name_for {
@@ -137,7 +137,7 @@ sub _service_name_for {
my $name = $ref;
my $i = 0;
- while (exists $self->services->{$name}) {
+ while (exists $self->_services->{$name}) {
$name = $ref . $i++;
}

0 comments on commit 3a23a0e

Please sign in to comment.
Something went wrong with that request. Please try again.