Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the SVN-Hooks CPAN distribution.

Report information
The Basics
Id: 69343
Status: resolved
Priority: 0/
Queue: SVN-Hooks

People
Owner: Nobody in particular
Requestors: me [...] jasonfried.info
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.90
Fixed in: (no value)



Subject: svn-hooks.conf config file is not optional, causes DIE when non-existant
The documentation says that the config file is only loaded if it exists, so then one would expect run_hook not to DIE if its non-existent. #Work around #Add the following to your script using SVN::Hooks (very hackish) @SVN::Hooks::Conf_Files = (); Snippit from run_hook sub with fix in place # Reload all configuration files foreach my $conf (@Conf_Files) { package main; last unless ( -e "$Repo/$conf" ); ##### Check for existence unless (my $return = do "$Repo/$conf") { die "couldn't parse '$Repo/$conf': $@\n" if $@; die "couldn't do '$Repo/$conf': $!\n" unless defined $return; die "couldn't run '$Repo/$conf'\n" unless $return; } }
Subject: Re: [rt.cpan.org #69343] svn-hooks.conf config file is not optional, causes DIE when non-existant
Date: Thu, 7 Jul 2011 18:24:08 -0300
To: bug-SVN-Hooks [...] rt.cpan.org
From: Gustavo Leite de Mendonça Chaves <gnustavo [...] cpan.org>
2011/7/7 Jason Fried via RT <bug-SVN-Hooks@rt.cpan.org> Show quoted text
> > > The documentation says that the config file is only loaded if it exists, > so then one would expect run_hook not to DIE if its non-existent. >
You're right. I've applied your patch to trunk. (I've only substituted a 'next' for your 'last' command). I'll try to release a new version soon. Thank you very much. Gustavo.
I've just released version 0.91 on CPAN with this patch applied.