106 |
if ( ! defined( $templates->{$module} ) ) { |
if ( ! defined( $templates->{$module} ) ) { |
107 |
$req->conn->send_status_line( 404, "$module" ); |
$req->conn->send_status_line( 404, "$module" ); |
108 |
$req->print("Package $module not found"); |
$req->print("Package $module not found"); |
109 |
|
} elsif ( ! $method ) { |
110 |
|
$req->print( Frey::HTML->page( 'package-methods', $req, $module ) ); |
111 |
} elsif ( grep(/^\Q$method\E$/, @{ $templates->{$module} }) ) { |
} elsif ( grep(/^\Q$method\E$/, @{ $templates->{$module} }) ) { |
112 |
$req->print( Frey::HTML->page( $method, $req ) ); |
$req->print( Frey::HTML->page( $method, $req ) ); |
113 |
} else { |
} else { |
117 |
} else { |
} else { |
118 |
my $html = Frey::HTML->page( 'status' ); |
my $html = Frey::HTML->page( 'status' ); |
119 |
$req->print( $html ); |
$req->print( $html ); |
120 |
warn ">> ",length( $html ), " bytes | ", substr($html, 0, 80),$/; |
warn ">> ",length( $html ), " bytes\n"; |
121 |
} |
} |
122 |
$req->next; |
$req->next; |
123 |
} |
} |