Re: [SMARTY-DEV] DIR_SEP constant

From: Date: Sun, 30 Mar 2003 05:34:24 +0000
Subject: Re: [SMARTY-DEV] DIR_SEP constant
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1051@lists.php.net to get a copy of this message
> but i would also reject to add something like: > > if (!defined('DIR_SEP')) define('DIR_SEP', DIRECTORY_SEPARATOR); > else if (DIR_SEP!=DIRECTORY_SEPARATOR) trigger_error('cannot define > DIR_SEP', E_USER_ERROR) > > this would look a bit paranoid. Agreed. > i think DIR_SEP is a relict of times where DIRECTORY_SEPARATOR wasn't > available in php natively. since smarty does not support php before > 4.0.6 (where DIRECTORY_SEPARATOR was introduced), a cleaner solution > would be to abandon DIR_SEP fully and only use DIRECTORY_SEPARATOR > inside smarty. i don't see a reason against this, but this would have > to be discussed with Monte. Pefect idea. > conclusion: if you need a fast solution: lower you error_reporting > temporarily (while the inclusion of Smarty.class.php) or supress the > notice with the @-operator. > > or maybe change the order of the libraries you include, then smarty > is > in charge of definig DIR_SEP, and the other libraries complain > instead > of smarty (not that serious :) > > have fun > messju Actually, its not serious that Smarty complains about it either, but it does seem unnecessary. Especially since we agree not to be paranoid about it :). After all, any given system should only have one possible value for DIR_SEP, namely DIRECTORY_SEPARATOR. Perhaps Smarty can be a little "nicer" to the global namespace and use SMARTY_DIR_SEP if a local constant is to be kept instead of using DIRECTORY_SEPARATOR, though I like your idea to use the system supplied constant directly. Thanks for the reply. xo boots __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com

« previous php.smarty.dev (#1051) next »