Re: DBA - closing in on an initial release (fwd)
| From: | Brent Cook | Date: | Sun, 07 Jul 2002 15:00:04 +0000 |
| Subject: | Re: DBA - closing in on an initial release (fwd) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7528@lists.php.net to get a copy of this message | ||
> Well, actually these points are more or less minor things. Generally
> speaking, your code looks pretty much pearified and you should release
> a first version so that people can start playing with it. If you need
> advise on how to roll a release, just ask here.
>
> - Martin
OK, I think I took care of all of those minor points. I have a few
questions though:
1) With peardoc, should we use "@return" or "@returns" to signify what a
method or function returns. I ran my code through phpdocumentor, and was
surprised to see that it uses both, but in different ways. So, my code
uses "@return" to signify the data _type_ returned and "@returns" to
describe that data (e.g. an array of records, etc.)
A simple function might have this:
* @return boolean
* @returns true on success, false on failure
Does anyone have comments on this? It seems that following the format of
@param would make more sense, e.g.
* @returns boolean true on success, false on failure
The command-line version of PHPDoc appears to freeze in the parsing stage
of looking at my code, so I was unable to see what it does
2) I am having issues with PEAR destructors. They work fine with DBA and
its drivers, but do not work with DBA_Table or DBA_Relational. I just
can't see what I did differently, other than DBA using a factory method
for creating new objects and creating tables and databases with =& new.
The problem is reproducible if you uncomment the echo statements in the
destructors and run test_relational.php. One should see several DBA
objects melt, several DBA_Tables melt and one DBA_Relational melt. So far,
only the DBA objects melt.
3) I had one really creepy bug using ftruncate(). If you ftruncate a file
and then fseek to the beginning, the file is neither truncated nor is the
file pointer set to the beginning of the file. Instead, you get a bunch of
nulls inserted into the file at the end. This behavior only appears with
mod_php however; the cli version of php does not appear to have this
issue. If you use ftruncate(), fseeking to the beginning _first_ clears
the problem. FYI.
- Brent