[Bps-public-commit] Prophet branch, master, updated. d29000f6a86cd79c7a2f0ffd77553393376ae2ec
jesse
jesse at bestpractical.com
Mon Jun 8 23:59:39 EDT 2009
The branch, master has been updated
via d29000f6a86cd79c7a2f0ffd77553393376ae2ec (commit)
via 7cabac04fb54e06b3c45919a521f62c2f98d56fb (commit)
from 92fcc26c7bc5d3c9f28aa67bba653bc2f706d35e (commit)
Summary of changes:
lib/Prophet/FilesystemReplica.pm | 1 -
lib/Prophet/Replica.pm | 11 ++++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 7cabac04fb54e06b3c45919a521f62c2f98d56fb
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Mon Jun 8 23:58:39 2009 -0400
Improve our "WTF" message for replica urls
diff --git a/lib/Prophet/Replica.pm b/lib/Prophet/Replica.pm
index a70a9ee..5fb62a1 100644
--- a/lib/Prophet/Replica.pm
+++ b/lib/Prophet/Replica.pm
@@ -79,7 +79,7 @@ sub get_handle {
if ( !$new_class ) {
$class->log_fatal(
- "$scheme isn't a replica type I know how to handle. (The Replica URL given was $args{url})."
+ "I don't know how to deal the replica URL you provided - '@{[ $args{url}]}'"
);
}
@@ -131,6 +131,8 @@ sub _url_to_replica_class {
my $url = $args{'url'};
my ( $scheme, $real_url ) = $url =~ /^([^:]*):(.*)$/;
+ return undef unless $scheme;
+
for my $class (
ref( $args{app_handle} ) . "::Replica::" . $scheme,
"Prophet::Replica::".$scheme ) {
@@ -1045,8 +1047,11 @@ sub log_fatal {
# always skip this fatal_error function when generating a stack trace
local $Carp::CarpLevel = $Carp::CarpLevel + 1;
-
- $self->app_handle->log_fatal(@_);
+ if ( eval {$self->app_handle }) {
+ $self->app_handle->log_fatal(@_);
+ } else {
+ die join('', at _) ."\n";
+ }
}
=head2 changeset_creator
commit d29000f6a86cd79c7a2f0ffd77553393376ae2ec
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Mon Jun 8 23:59:26 2009 -0400
remove spurious use
diff --git a/lib/Prophet/FilesystemReplica.pm b/lib/Prophet/FilesystemReplica.pm
index 1506036..fab2796 100644
--- a/lib/Prophet/FilesystemReplica.pm
+++ b/lib/Prophet/FilesystemReplica.pm
@@ -2,7 +2,6 @@ package Prophet::FilesystemReplica;
use Any::Moose 'Role';
use File::Spec;use Params::Validate qw(:all);
use LWP::UserAgent;
-use LWP::ConnCache;
use JSON;
use Prophet::Util;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list