[Bps-public-commit] Config-GitLike branch, master, updated. 1.00-35-g2d0df23

Alex Vandiver alexmv at bestpractical.com
Fri Apr 2 21:07:05 EDT 2010


The branch, master has been updated
       via  2d0df23d90b41c9ce6eca4c14a93a26776f11150 (commit)
      from  1925c1c1a37d26938153c402cb172a6f3dc0686d (commit)

Summary of changes:
 lib/Config/GitLike.pm |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 2d0df23d90b41c9ce6eca4c14a93a26776f11150
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Apr 2 21:07:18 2010 -0400

    Skip already-loaded files

diff --git a/lib/Config/GitLike.pm b/lib/Config/GitLike.pm
index 6a1e973..850ac0a 100644
--- a/lib/Config/GitLike.pm
+++ b/lib/Config/GitLike.pm
@@ -140,8 +140,10 @@ sub load_file {
     my $self = shift;
     my ($filename) = @_;
     $self->data({}) unless $self->is_loaded;
-    my $c = $self->_read_config($filename);
 
+    return $self->data if grep {$_ eq $filename} @{$self->config_files};
+
+    my $c = $self->_read_config($filename);
     $self->parse_content(
         content  => $c,
         callback => sub {

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list