summaryrefslogtreecommitdiff
path: root/usr/src/libpiny/Piny/Repo.pm
diff options
context:
space:
mode:
authorJulian Blake Kongslie <jblake@omgwallhack.org>2010-03-17 22:54:02 -0700
committerJulian Blake Kongslie <jblake@omgwallhack.org>2010-03-17 22:54:02 -0700
commitae5a764ebe9a8e055dd2521c6db43232c3e705f8 (patch)
tree068befaad4755693494f4fdac9195a8163b13150 /usr/src/libpiny/Piny/Repo.pm
parent654a7353e1c46878dd84bfef0e987f0205e03fde (diff)
downloadpiny-code-ae5a764ebe9a8e055dd2521c6db43232c3e705f8.tar.gz
piny-code-ae5a764ebe9a8e055dd2521c6db43232c3e705f8.zip
Remove newlines from fatal errors, so we get useful traces.
Diffstat (limited to 'usr/src/libpiny/Piny/Repo.pm')
-rw-r--r--usr/src/libpiny/Piny/Repo.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr/src/libpiny/Piny/Repo.pm b/usr/src/libpiny/Piny/Repo.pm
index 51034dd..b10651f 100644
--- a/usr/src/libpiny/Piny/Repo.pm
+++ b/usr/src/libpiny/Piny/Repo.pm
@@ -66,7 +66,7 @@ sub _rename_repo {
my $olddir = "/srv/git/$old_name.git";
my $newdir = "/srv/git/$new_name.git";
- rename( $olddir, $newdir ) or die "Couldn't rename $olddir to $newdir: $!\n";
+ rename( $olddir, $newdir ) or die "Couldn't rename $olddir to $newdir: $!";
$s->clear_path( );
};
@@ -76,9 +76,9 @@ sub _set_description {
return unless defined $old_description;
- open( my $fd, ">", $s->path( ) . "/description" ) or die "Unable to open " . $s->path( ) . "/description for writing: $!\n";
+ open( my $fd, ">", $s->path( ) . "/description" ) or die "Unable to open " . $s->path( ) . "/description for writing: $!";
print $fd $new_description;
- close( $fd ) or die "Error when closing " . $s->path( ) . "/description: $!\n";
+ close( $fd ) or die "Error when closing " . $s->path( ) . "/description: $!";
};
# Builder methods
@@ -102,14 +102,14 @@ sub _build_path {
if ( -d $dir ) {
return $dir;
} else {
- die "Expected repo $dir does not exist!\n";
+ die "Expected repo $dir does not exist!";
};
};
sub _build_description {
my ( $s ) = @_;
- open( my $d, "<", $s->path( ) . "/description" ) or die "Unable to open " . $s->path( ) . "/description: $!\n";
+ open( my $d, "<", $s->path( ) . "/description" ) or die "Unable to open " . $s->path( ) . "/description: $!";
my $desc;
{
local $/ = undef;
@@ -124,7 +124,7 @@ sub _build_repostat {
my ( $s ) = @_;
my @res = stat( $s->path( ) );
- die "stat( " . $s->path( ) . " ) failed: $!\n" unless @res;
+ die "stat( " . $s->path( ) . " ) failed: $!" unless @res;
return \@res;
};