diff options
author | Eric Wong <e@80x24.org> | 2016-03-07 08:10:58 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-04-05 18:58:27 +0000 |
commit | 2d3debbcf3fa4a4f0705624a897cf43547e5bf32 (patch) | |
tree | 5d54470ea9a4e90f924b41921f8b12696277d62c | |
parent | 9c8e361c7270da7cb665257e01d221e46bbf00a3 (diff) | |
download | public-inbox-2d3debbcf3fa4a4f0705624a897cf43547e5bf32.tar.gz |
This allows RepobrowseConfig objects to passed directly to Repobrowse initialization, similar to the way the normal Config can be passed to WWW at initialization.
-rw-r--r-- | lib/PublicInbox/Repobrowse.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/Repobrowse.pm b/lib/PublicInbox/Repobrowse.pm index fe06a5be..0b09800b 100644 --- a/lib/PublicInbox/Repobrowse.pm +++ b/lib/PublicInbox/Repobrowse.pm @@ -29,8 +29,9 @@ my %VCS = (git => 'Git'); my %LOADED; sub new { - my ($class, $file) = @_; - bless { rconfig => PublicInbox::RepobrowseConfig->new($file) }, $class; + my ($class, $rconfig) = @_; + $rconfig ||= PublicInbox::RepobrowseConfig->new; + bless { rconfig => $rconfig }, $class; } # simple response for errors |