ARSperl
view release on metacpan or search on metacpan
html/manual/ars_GetListContainer.html view on Meta::CPAN
<DD>Returns undef.</DD>
</DL>
<P>Example 1 (retrieve all active link guides):</P>
<PRE>
@list = ars_GetListContainer($ctrl, 0, &ARS::AR_HIDDEN_INCREMENT, &ARS::ARCON_GUIDE);
die "$ars_errstr" if $ars_errstr;
</PRE>
<P>Example 2 (retrieve all globally owned containers plus all containers of a specific schema):</P>
<PRE>
@list = ars_GetListContainer($ctrl, 0, &ARS::AR_HIDDEN_INCREMENT, [
{type => 'all', ownerName => ''},
{type => 'schema', ownerName => 'Sample:Schema'},
] );
die "$ars_errstr" if $ars_errstr;
</PRE>
<P>
html/manual/ds_container.html view on Meta::CPAN
"adminList" => <i>list</i> of groups (ids) who can administer this container,
"changeDiary" => <i>list</i> of references to <a href="ds_diaryentry_hash.html">Diary Entry Structures</a>
"groupList" => reference to a hash of group ids and their access permissions ('hidden' or 'visible',
"helpText" => help text associated with the container (string),
"lastChanged" => user who made the last change to the container (string),
"label" => label for this container (string),
"name" => name of container (string),
"numReferences" => number of objects referenced by the container (integer),
"objPropList" => <I>list</I> of references to <a href="ds_prop_hash.html">Property Hash</a>,
"owner" => owning user for the container (string),
"ownerObjList" => <i>list</i> of the schemas that own this container. If this parameter is NULL, the container exists globally,
"referenceList" => <i>list</i> of references to <a href="ds_reference.html">Reference Hash</a>,
"timestamp" => time stamp identifying the last change to the container (integer),
"type" => type for this container (string)
}
</PRE>
Example:<P>
<PRE>
$c = ars_GetContainer($ctrl,$filterGuide);
{
my $file;
while (@ARGV) {
$file = shift @ARGV;
if ($file eq '-' or -f $file or -l $file) {
return $file;
} elsif (-d $file) {
if ($opt_r) {
expand_glob($file);
} else {
print STDERR "Skipping directory `$file'\n";
}
} elsif ($opt_a) {
return $file;
} else {
print STDERR "Skipping `$file': not a file or directory\n";
}
}
return undef;
}
# Put all the files in $directory into @ARGV for processing.
sub expand_glob
{
my ($directory) = @_;
$directory =~ s:/$::;
opendir DIR, $directory;
foreach (readdir DIR) {
next if ($_ eq '.' or $_ eq '..');
# expand_glob() is going to be called until $ARGV[0] isn't a
# directory; so push directories, and unshift everything else.
if (-d "$directory/$_") { push @ARGV, "$directory/$_" }
else { unshift @ARGV, "$directory/$_" }
}
closedir DIR;
}
# Given $file, a symbolic link to a directory in the C include directory,
# make an equivalent symbolic link in $Dest_dir, if we can figure out how.
sub link_if_possible
{
my ($dirlink) = @_;
my $target = eval 'readlink($dirlink)';
if ($target =~ m:^\.\./: or $target =~ m:^/:) {
# The target of a parent or absolute link could leave the $Dest_dir
# hierarchy, so let's put all of the contents of $dirlink (actually,
# the contents of $target) into @ARGV; as a side effect down the
# line, $dirlink will get created as an _actual_ directory.
expand_glob($dirlink);
} else {
if (-l "$Dest_dir/$dirlink") {
unlink "$Dest_dir/$dirlink" or
print STDERR "Could not remove link $Dest_dir/$dirlink: $!\n";
}
if (eval 'symlink($target, "$Dest_dir/$dirlink")') {
print "Linking $target -> $Dest_dir/$dirlink\n";
# Make sure that the link _links_ to something:
( run in 0.516 second using v1.01-cache-2.11-cpan-49f99fa48dc )