IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2894


Ignore:
Timestamp:
Jan 4, 2005, 12:08:20 PM (22 years ago)
Author:
jhoblitt
Message:

add stat method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/lib/Nebulous/Client.pm

    r2880 r2894  
    11# Copyright (c) 2004  Joshua Hoblitt
    22#
    3 # $Id: Client.pm,v 1.7 2005-01-04 02:46:26 jhoblitt Exp $
     3# $Id: Client.pm,v 1.8 2005-01-04 22:08:20 jhoblitt Exp $
    44
    55package PS::IPP::IData::Client;
     
    654654}
    655655
     656sub stat {
     657    my $self = shift;
     658
     659    my ( $key ) = validate_pos( @_,
     660        {
     661            type => SCALAR,
     662        },
     663    );
     664
     665    $log->debug( "entered - key: $key" );
     666
     667    my $response = $self->{ 'server' }->stat_object( $key );
     668    if ( $response->fault ) {
     669        $log->error( $response->faultcode, " - ", $response->faultstring );
     670        $log->debug( "leaving" );
     671
     672        return undef;
     673    }
     674
     675    $log->debug( "server returned a stat" );
     676
     677    my $stats = $response->result;
     678
     679    $log->debug( "leaving" );
     680
     681    return $stats;
     682}
     683
    6566841;
    657685
Note: See TracChangeset for help on using the changeset viewer.