Re: [PEPr] +1 for PHP::Shell
| From: | Jan Kneschke | Date: | Tue, 23 May 2006 11:19:15 +0000 |
| Subject: | Re: [PEPr] +1 for PHP::Shell | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42560@lists.php.net to get a copy of this message | ||
On Tue, May 23, 2006 at 07:03:57AM -0000, Bertrand Mansion wrote:
>
> Bertrand Mansion (http://pear.php.net/user/mansion) has voted +1 on the proposal for
> PHP::Shell.
>
> Proposal information:
> http://pear.php.net/pepr/pepr-proposal-show.php?id=397
> Vote information:
>
> http://pear.php.net/pepr/pepr-vote-show.php?id=397&handle=mansion
>
> This vote is conditional. The condition is:
>
> You must remove the __autoload() stuff. If your file is loaded first,
> it will take the namespace. __autoload() should never be defined in
> PEAR packages.
That's why the __autoload() is only defined of the if __autoload() isn't
defined before. The shell-class is supposed to be included at the end of
the shell-script.
But as it was pointed out this is breaking valid code like:
>> include 'my-autoload.php'
where my-autoload is containing a __autoload().
To get out of this I'll add a vim like interface:
>> :set bg=dark
instead of
>> $__shell->setColourScheme('dark')
and
>> :set al=1
to create enable the internal __autoload()
(bg and al will be available as long versions too).
:set ... is invalid no normal PHP (at the start of the line) and can be
taken by shell.
Additionally there will be a ~/.php-shell.rc file with commands to
execute in the shell at startup (like :set bg=dark and :set al=1)
Jan
--
Jan Kneschke http://jan.kneschke.de/
Perhaps you want to say 'thank you, jan': http://jk.123.org/wishlist/