IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6647


Ignore:
Timestamp:
Mar 20, 2006, 12:01:47 PM (20 years ago)
Author:
jhoblitt
Message:

make ->new() params fileset, datetime, & type optional

Location:
trunk/DataStore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataStore/lib/DataStore/FileSet.pm

    r6614 r6647  
    11# Copyright (C) 2006  Joshua Hoblitt
    22#
    3 # $Id: FileSet.pm,v 1.8 2006-03-17 01:10:51 jhoblitt Exp $
     3# $Id: FileSet.pm,v 1.9 2006-03-20 22:01:47 jhoblitt Exp $
    44
    55package DataStore::FileSet;
     
    8989The FileSet ID as a string.
    9090
     91This key is optional.
     92
    9193=item * datetime
    9294
    9395The time and date as a string.
    9496
     97This key is optional.
     98
    9599=item * type
    96100
    97101The I<type> of record as a string.
     102
     103This key is optional.
    98104
    99105=back
     
    120126                type        => SCALAR,
    121127                regex       => $STD_FIELD,
     128                optional    => 1,
    122129            },
    123130            datetime    => {
    124131                type        => SCALAR,
    125132                regex       => $TIME_FIELD,
     133                optional    => 1,
    126134            },
    127135            type        => {
     
    131139                        sub { exists $KNOWN_FILESET_TYPES{$_[0]} },
    132140                },
     141                optional    => 1,
    133142            },
    134143        },
  • trunk/DataStore/t/06_fileset.t

    r6633 r6647  
    33# Copyright (C) 2006  Joshua Hoblitt
    44#
    5 # $Id: 06_fileset.t,v 1.5 2006-03-17 23:54:35 jhoblitt Exp $
     5# $Id: 06_fileset.t,v 1.6 2006-03-20 22:01:47 jhoblitt Exp $
    66
    77use strict;
     
    6969    my $dsp = DataStore::FileSet->new;
    7070};
    71 like($@, qr/Mandatory parameters/,
     71like($@, qr/Mandatory parameter/,
    7272    '->new() fails when not passed all manadator params');
    7373
     
    149149}
    150150
     151sleep 60;
    151152# cleanup HTTP server
    152153kill 9, $pid;
Note: See TracChangeset for help on using the changeset viewer.