Hi Stanislav,

> Below is the proposal for PHP packaging extension. The intentions is for
> PHP to have the package system kind of like what Perl and other languanges
> have. The comments and suggestions are most welcome, as usual. Especially
> the experience with packaging system from other languages.

+1000 for this proposal. It's very useful and makes things very clear and
easy to use.


> package_load("Name")

What about

import("Name") and
import name

short, clean and descriptive, isn't it?


> Technology:
> ==========
>
> Package is located and loaded in the following way:
>
> 1. First, the package location name is determined. If the name does not
contain
> :: signs, the package location name is the package name. If the package
name
> contains ::, each :: component is a subdirectory, i.e. Foo::Bar::Baz
> produces the location name of Foo/Bar/Baz (just like in Perl).

How about using the "." as a seperator? Ok, you can not use filenames with
more than one dot in them, but I think that's  an advantage even if it looks
like a drawback. The packaged files are clear structured Name.Extension and
not name.anothername.something.extension. This will also account for OS's
that don't like moe than one dots in fnames and the cdrom ISO conventions
etc.

> Package: Foo::Bar
> Version: 3.14.15
> Requires: PEAR
> Requires: DB::MySQL
> Files:
> boobar.php
> boo.inc
> classes/class.A.inc
> classes/class.B.inc

Looks good, but as Stig said, pear does already have a xml description file.
I find this very convinient and useful. What performance concerns: PHP could
create a php-version of the package.xml on first load call if xml parsing at
runtime is to slow.

I'm looking forward to have such an extension soon. This is real benefit to
the coders world.

Andi

--
www.thyrell.com





-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to