Subject: | Indentatoin |
Just tried the module and it looks mighty useful!
But one thing that doesn't look quite right is the indentation. Let's say I extract this to a method:
-----
my $resHttp = $oResponse;
if ($resHttp->is_success) {
$win->tfHttp->Text($resHttp->headers_as_string());
$win->tfHtml->Text($resHttp->content());
} else {
my $message = "Error getting url ($url): " . $resHttp->message;
$win->tfHttp->Text($message);
$win->tfHtml->Text($message);
}
-----
The resulting sub is:
-----
sub dostuff {
my $win = shift;
my $oResponse = shift;
my $url = shift;
my $resHttp = $oResponse;
if ($resHttp->is_success) {
$win->tfHttp->Text($resHttp->headers_as_string());
$win->tfHtml->Text($resHttp->content());
} else {
my $message = "Error getting url ($url): " . $resHttp->message;
$win->tfHttp->Text($message);
$win->tfHtml->Text($message);
}
return ($message, $resHttp);
}
-----
So my cosmetic objection to that would be a) the indentation level, and b) the extra blank line at the top which could automatically be removed.
Just a wishlist item.
/J