IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 6, 2008, 12:12:07 PM (18 years ago)
Author:
jhoblitt
Message:

allow volume name arguments to be undef

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/lib/Nebulous/Server.pm

    r17536 r17539  
    11# Copyright (c) 2004-2008  Joshua Hoblitt
    22#
    3 # $Id: Server.pm,v 1.61 2008-05-06 02:51:20 jhoblitt Exp $
     3# $Id: Server.pm,v 1.62 2008-05-06 22:10:58 jhoblitt Exp $
    44
    55package Nebulous::Server;
     
    77use strict;
    88use warnings FATAL => qw( all );
     9no warnings qw( uninitialized );
    910
    1011our $VERSION = '0.08';
     
    151152            callbacks   => {
    152153                # check that the volume requested is valid
    153                 'is valid volume name' => sub { $self->_is_valid_volume_name($_[0]) },
     154                'is valid volume name' => sub {
     155                    return 1 if not defined $_[0];
     156                    $self->_is_valid_volume_name($_[0])
     157                },
    154158            },
    155159            optional    => 1,
     
    317321        },
    318322        {
    319             type        => SCALAR,
     323            type        => SCALAR|UNDEF,
    320324            callbacks   => {
    321325                # check that the volume name requested is valid
    322                 'is valid volume name' => sub { $self->_is_valid_volume_name($_[0]) },
     326                'is valid volume name' => sub {
     327                    return 1 if not defined $_[0];
     328                    $self->_is_valid_volume_name($_[0])
     329                },
    323330            },
    324331            optional    => 1,
     
    910917        },
    911918        {
    912             type        => SCALAR,
     919            type        => SCALAR|UNDEF,
    913920            callbacks   => {
    914921                # check that the volume name requested is valid
    915                 'is valid volume name' => sub { $self->_is_valid_volume_name($_[0]) },
     922                'is valid volume name' => sub {
     923                    return 1 if not defined $_[0];
     924                    $self->_is_valid_volume_name($_[0])
     925                },
    916926            },
    917927            optional    => 1,
Note: See TracChangeset for help on using the changeset viewer.