=cut
sub eidiot {
- #warn "eidiot depriciated";
+ warn "eidiot depriciated";
idiot(@_);
if (exists $ENV{MOD_PERL}) {
- eval {
- use Apache;
- Apache::exit();
- };
+ require Apache;
+ Apache::exit();
} else {
exit;
}
sub popurl {
my($up)=@_;
- my($cgi)=&FS::UID::cgi;
- my($url)=new URI::URL $cgi->url;
+ my $cgi = &FS::UID::cgi;
+ my $url = new URI::URL ( $cgi->isa('Apache') ? $cgi->uri : $cgi->url );
my(@path)=$url->path_components;
splice @path, 0-$up;
$url->path_components(@path);