Tk
view release on metacpan or search on metacpan
Tk/Dirlist.pm view on Meta::CPAN
return $path;
}
sub AddDir
{
my ($w,$dir) = @_;
my $path = '';
my $prefix = '';
my $first = 0;
my $name;
foreach $name (split m#/#,$dir)
{
$first++;
if ($name eq '')
{
next unless ($first == 1);
$path = '/';
$name = '/';
}
else
{
}
}
sub MasterMenu
{
my ($menu) = @_;
my $pathname = $menu->PathName;
my $master_menu;
if ($pathname =~ m{#})
{
my $master_pathname = (split m{\.}, $pathname)[-1];
$master_pathname =~ s{#}{.}g;
$master_menu = $menu->Widget($master_pathname);
if (0 && !Tk::Exists($master_menu))
{
warn "Cannot find master menu <$master_pathname>";
}
}
$master_menu;
}
pTk/mTk/tclGeneric/tclIOUtil.c view on Meta::CPAN
}
} else {
/* Init to an empty string */
retVal = Tcl_NewStringObj("",0);
Tcl_IncrRefCount(retVal);
}
/*
* We increment and then decrement the refCount of split to free
* it. We do this right at the end, in case there are
* optimisations in Tcl_FSJoinPath(split, nplen) above which would
* let it make use of split more effectively if it has a refCount
* of zero. Also we can't just decrement the ref count, in case
* 'split' was actually returned by the join call above, in a
* single-element optimisation when nplen == 1.
*/
Tcl_IncrRefCount(split);
Tcl_DecrRefCount(split);
/* This has a refCount of 1 for the caller */
return retVal;
}
( run in 0.859 second using v1.01-cache-2.11-cpan-71847e10f99 )