WWW-Crab-Client

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    - Add timeout option.

0.05 2013-09-04

    - Declare requirement of Perl 5.8.0.

0.04 2013-08-29

    - Add support for CRABUSERCONFIG variable.
    - Add WARNING finish status.
    - Avoid test failure without getpwuid.

0.03 2013-03-28

    - Add ALREADYRUNNING finish status.

0.02 2012-10-19

    - Allow empty configuration files.

0.01 2012-10-04

lib/WWW/Crab/Client.pm  view on Meta::CPAN

#
# Detects the username of the current user.
#
# This provides the default value for the username parameter
# of the WWW::Crab::Client constructor.

sub _get_username {
    my $username = undef;

    eval {
        $username = scalar getpwuid($<);
    };

    return $username if defined $username;

    eval {
        require Win32;
        $username = Win32::LoginName();
    };

    return $username if defined $username;



( run in 0.237 second using v1.01-cache-2.11-cpan-454fe037f31 )