IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17650


Ignore:
Timestamp:
May 12, 2008, 5:55:08 PM (18 years ago)
Author:
jhoblitt
Message:

change Nebulous::Server::stat() to not die when passed a non-existant key

Location:
trunk/Nebulous-Server
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/Changes

    r17620 r17650  
    22
    330.10
     4    - change Nebulous::Server::stat() to not die when passed a non-existant key
    45    - change listxattr_object() to return an arrayref
    56    - change default log level to 'WARN'
  • trunk/Nebulous-Server/lib/Nebulous/Server.pm

    r17620 r17650  
    11# Copyright (c) 2004-2008  Joshua Hoblitt
    22#
    3 # $Id: Server.pm,v 1.66 2008-05-10 01:15:13 jhoblitt Exp $
     3# $Id: Server.pm,v 1.67 2008-05-13 03:55:08 jhoblitt Exp $
    44
    55package Nebulous::Server;
     
    10761076        {
    10771077            type        => SCALAR,
    1078             callbacks   => {
    1079                 'is valid object key' => sub { $self->_is_valid_object_key($_[0]) },
    1080             },
    10811078        },
    10821079    );
     
    10871084
    10881085    $log->debug("entered - @_");
     1086
     1087    # does this key exist?
     1088    return unless ($self->_is_valid_object_key($key));
    10891089
    10901090    # ignore volume
  • trunk/Nebulous-Server/t/09_server_stat_object.t

    r17072 r17650  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 09_server_stat_object.t,v 1.13 2008-03-20 21:10:14 jhoblitt Exp $
     5# $Id: 09_server_stat_object.t,v 1.14 2008-05-13 03:55:08 jhoblitt Exp $
    66
    77use strict;
     
    4949Test::Nebulous->setup;
    5050
    51 eval {
    52     $neb->stat_object("foo");
    53 };
    54 like($@, qr/is valid object key/, "object does not exist");
     51{
     52    my $stat = $neb->stat_object("foo");
     53    is($stat, undef, "object does not exist");
     54}
    5555
    5656Test::Nebulous->setup;
Note: See TracChangeset for help on using the changeset viewer.