DBD-Informix
view release on metacpan or search on metacpan
lib/DBD/Informix/TechSupport.pm view on Meta::CPAN
# perl BugReport 2>&1 | tee bugreport.out
sub bug_report
{
my ($opt, @tests) = @_;
$| = 1;
# Simulate (Solaris dialect of) 'id' program in Perl.
my ($id, $name, $gid, @rgrps, $egid, @egrps, $pad);
$name = getpwuid($<);
$id = "uid=$<($name)";
@rgrps = split / /, $(;
$gid = $rgrps[0];
shift @rgrps;
$name = getgrgid($gid);
$id .= " gid=$gid($name)";
if ($< != $>)
{
$name = getpwuid($>);
$id .= " euid=$>($name)";
}
@egrps = split / /, $);
$egid = $egrps[0];
if ($egid != $gid)
{
$name = getgrgid($egid);
$id .= " egid=$egid($name)";
}
$pad = " groups=";
lib/DBD/Informix/TechSupport.pm view on Meta::CPAN
print "+ $cmd\n";
warn $msg unless system($cmd) == 0;
}
# Print a report that the installation works
sub it_works
{
my ($sec,$min,$hour,$mday,$mon,$year) = gmtime(time);
my ($date) = sprintf "%04d-%02d-%02d", $year + 1900, $mon + 1, $mday;
my ($uname,$passwd,$uid,$gid,$quota,$comment,$gcos,$dir,$shell) = getpwuid $>;
#perl -MConfig -e 'for $key (sort keys %Config) { print "$key = $Config{$key}\n"; }'
# Try to generate an email name and address
my ($who) = "$uname\@$Config{myhostname}$Config{mydomain}";
if ($comment)
{
$who = "$comment <$who>";
}
elsif ($gcos)
( run in 0.279 second using v1.01-cache-2.11-cpan-8d75d55dd25 )