Apache-Authen-Generic

 view release on metacpan or  search on metacpan

Generic.pm  view on Meta::CPAN

            }
            $url .= $sep unless $url =~ /\?$/;
        } else {
            $url .= '?';
        }

        $url .= $self->_urlEncodeVars($param_hash, $sep);
        return $url;
    }

    sub _formatDateTime {
        my ($self, $time) = @_;

        $time = time() unless $time;

        my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($time);
        $mon += 1;
        $year += 1900;
        my $date = sprintf "%04d-%02d-%02d %02d:%02d:%02d", $year, $mon, $mday,
            $hour, $min, $sec;

        return $date;
    }

    sub _log {
        my ($self, @rest) = @_;
        local(*LOG);
        open(LOG, ">>/tmp/generic_auth_log");
        my $date = $self->_formatDateTime;
        print LOG "$date - ", @rest, "\n";
        close LOG;
    }

}

1;

__END__



( run in 0.299 second using v1.01-cache-2.11-cpan-05444aca049 )