[augeas-devel] [PATCH] phpvars lens
David Lutterkort
lutter at redhat.com
Mon Dec 22 18:55:08 UTC 2008
On Sat, 2008-12-20 at 11:32 +0000, free at 64studio.com wrote:
> commit 235549e7080e9d91d1086e9a84840cb8a217d8a8
> Author: Free Ekanayaka <free at 64studio.com>
> Date: Sat Dec 20 00:23:54 2008 +0000
>
> Add lens and test for config files using PHP-style variables,
> like /etc/squirrelmail/config.php
I think this should be split into two modules: one for generic PHP-style
variables (Phpvars) and one for squirrelmail.
Looks good overall, one small nit:
> diff --git a/lenses/phpvars.aug b/lenses/phpvars.aug
> new file mode 100644
> index 0000000..d0ac3d4
> --- /dev/null
> +++ b/lenses/phpvars.aug
> @@ -0,0 +1,118 @@
> +(* Phpvars module for Augeas
> + Author: Free Ekanayaka <free at 64studio.com>
> +
> + Reference: PHP syntax
> +
> +*)
> +
> +module Phpvars =
> +
> + autoload xfm
> +
> +(************************************************************************
> + * USEFUL PRIMITIVES
> + *************************************************************************)
> +
> +let eol = Util.eol
> +let indent = Util.indent
> +let empty = Util.empty
> +
> +let sep_php = del /<\?php\n/ "<?php\n"
Shouldn't this allow at least some whitespace before the \n, i.e.
'del /<\?php[ \t]*\n/ "<?php\n"' ?
David
More information about the augeas-devel
mailing list