Re: [PEPr] Comment on File Formats::File_Fstab
| From: | Ian Eure | Date: | Sun, 04 Apr 2004 21:49:11 +0000 |
| Subject: | Re: [PEPr] Comment on File Formats::File_Fstab | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-27024@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday 03 April 2004 03:01 pm, Stefan Neufeind wrote:
> On 3 Apr 2004 at 11:57, Ian Eure wrote:
> > A nice idea, but a bit beyond the scope of what I want to do with
> > File_Fstab. I'd be happy to add set/get functions in _Entry, though, so a
> > descendent class could add this functionality.
>
> Well, but if you're going to implement get-/set-methods, what's the
> big deal of adding the optional verification? Imho this is what it
> would need to make the package "complete". Otherwise I might as well
> do the text-manipulations (adding a mountpoint "by hand", deleting a
> line from the file etc.) even without the class. I thought you wanted
> to make it more easy to handle the file ... and I think if the
> package makes it into PEAR it should be "complete" (in a sense), so
> we won't end up in a situation like "well, somebody else might
> implement that in his app" or so. Or did I get you wrong?
>
As I said, I think it's beyond the scope of File_Fstab. I offered to add get/
set methods so a descendent class (e.g. File_Fstab_Entry_Validating) could
override them to provide the functionality you describe.
I want File_Fstab to be a solid base to build other functionality on. For
example, I have an additional package, System_Mount[1], which uses File_Fstab
to provide mount/unmount operations on filesystems listed in the fstab. (I'll
be proposing System_Mount if/when File_Fstab is accepted) From that
perspective, validating filesystem types & blockdevs is definitely outside
the scope of the base package.
I think that writing one class which validates mountpoint/fstype/whatever and
extends File_Fstab is far preferable to writing code to do that /and/ read/
write a fstab-format file as well. And what I proposed, adding get/set
methods, would allow for exactly that. I don't buy your argument that just
because a package lacks /one function/, it should be completely
reimplemented.
As far as being "complete" goes, I feel that File_Fstab /is/ complete. It was
designed to read and write fstab files, and it does that. Validating the
data /in/ those files is additional functionality.
[1]: http://atomized.org/PEAR/System_Mount/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFAcILZxuUdPD6j2IMRAux5AKCFnLV9SfaPvcpVSYZC8NYA2yrUGgCfeomI
OZPcYqrFc66AxMKx5uyvFf0=
=93Ba
-----END PGP SIGNATURE-----