IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5282


Ignore:
Timestamp:
Oct 11, 2005, 4:49:56 PM (21 years ago)
Author:
jhoblitt
Message:

add $VESRION
add partial file_received()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-PSFTP/lib/PS/IPP/PSFTP.pm

    r5280 r5282  
    11# Copyright (C) 2005  Joshua Hoblitt
    22#
    3 # $Id: PSFTP.pm,v 1.4 2005-10-12 02:37:37 jhoblitt Exp $
     3# $Id: PSFTP.pm,v 1.5 2005-10-12 02:49:56 jhoblitt Exp $
    44
    55package PS::IPP::PSFTP;
     
    77use strict;
    88use warnings FATAL => qw( all );
     9
     10use vars qw( $VERSION );
     11$VERSION = '0.01';
    912
    1013use Carp qw( carp );
     
    6366}
    6467
     68sub file_received
     69{
     70    my $self = shift;
     71
     72    my %p = validate(@_,
     73        {
     74            id => {
     75                type        => SCALAR,
     76                regex       => qr/\S+/, # string with atleast 1 non WS char
     77            },
     78            discarded => {
     79                type        => SCALAR,
     80                callbacks   => {
     81                    'is 0 or 1' => sub { $_[0] == 0 or $_[0] == 1 },
     82                },
     83            },
     84        },
     85    );
     86
     87    my $url = $self->{base_url}
     88              . "/files_received"
     89              . "?recipient="
     90              . $self->{recipient}
     91              . "&id=" . $p{id}
     92              . "&discarded=" . $p{discarded};
     93}
     94
    65951;
    6696
Note: See TracChangeset for help on using the changeset viewer.