Salve,
sto studiando un paio di libri: uno sul PHP ed uno sui moduli per Drupal.
Ad un certo punto ho riscritto un modulo proposto dal secondo testo e mi sono accorto che una funzione definita con un underscore e dunque privata è visibile dal nuovo modulo.
L'originale è in goodreads.module:


function _goodreads_fetch_bookshelf($url, $num_items=3) {
$http_result = drupal_http_request($url);
if ($http_result->code == 200) {
$doc = simplexml_load_string($http_result->data);
if ($doc === false) {
$msg = "Error parsing bookshelf XML for %url: %msg.";
$vars = array('%url'=>$url, '%msg'=>$e->getMessage());
watchdog('goodreads', $msg, $vars, WATCHDOG_WARNING);
return t("Getting the bookself resulted in an error");
}
return _goodreads_block_content($doc, $num_items);

// Otherwise we don't have any data
}

Ma richiamata in test_mod.module così:
$blocks['content'] = _goodreads_fetch_bookshelf($url);

risulta visibile nonostante il testo affermi che con l'underscore non dovrebbe essere possibile.
E' qui che forse mi sbaglio: la convenzione non equivale allo statement private, vero?

Grazie di eventiuali chiarimenti.