IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42802


Ignore:
Timestamp:
May 4, 2025, 11:30:14 AM (15 months ago)
Author:
eugene
Message:

add method to return an array of instances for a nebulous file

File:
1 edited

Legend:

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

    r40494 r42802  
    13681368
    13691369
     1370# Return array of the instances for this nebulous file
     1371sub find_instances
     1372{
     1373    my $self = shift;
     1374    my $file = shift;
     1375
     1376    my $scheme = file_scheme($file);
     1377    if (!$scheme or ($scheme ne 'neb')) {
     1378        # if not nebulous, the instance is the file
     1379        my @result;
     1380        push @result, $file;
     1381        return (\@result);
     1382    }
     1383
     1384    my $neb = $self->nebulous;
     1385    my $uris;
     1386    eval { $uris = $neb->find_instances($file); };
     1387    if ($@) {
     1388        carp "failed to set user.copies for $file";
     1389        return 0;
     1390    }
     1391    return $uris;
     1392}
     1393
    13701394# Return catdir for tessellation, from TESSELLATIONS within the site configuration
    13711395sub tessellation_catdir
Note: See TracChangeset for help on using the changeset viewer.