X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=wrappers%2Fpl_Template.ml;h=f7acd0948a699e6ae3f748934fbef1b8e076f0c2;hb=HEAD;hp=1c830dd5cda8c8744c5b9fbb06983a3ce621ade2;hpb=efab5abed48d08e735c652c8454d14393c006c0e;p=perl4caml.git diff --git a/wrappers/pl_Template.ml b/wrappers/pl_Template.ml index 1c830dd..f7acd09 100644 --- a/wrappers/pl_Template.ml +++ b/wrappers/pl_Template.ml @@ -1,6 +1,22 @@ -(** Wrapper around Perl [Template] class (Template Toolkit). - * - * Author: Dave Benjamin . +(** Wrapper around Perl [Template] class (Template Toolkit). *) +(* Copyright (C) 2003 Dave Benjamin . + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + $Id: pl_Template.ml,v 1.3 2008-03-01 13:02:21 rich Exp $ *) open Perl @@ -14,14 +30,14 @@ module Variant = struct - type variant = + type t = | Null | String of string | Int of int | Float of float | Bool of bool - | Array of variant list - | Hash of (string * variant) list;; + | Array of t list + | Hash of (string * t) list;; end @@ -78,7 +94,7 @@ let new_ ?start_tag ?end_tag ?tag_style ?pre_chomp ?post_chomp ?trim may (fun v -> args := sv_of_string "END_TAG" :: sv_of_string v :: !args) end_tag; may (fun v -> - args := sv_of_string "TAG_STYLE" :: sv_of_string v :: !args) end_tag; + args := sv_of_string "TAG_STYLE" :: sv_of_string v :: !args) tag_style; may (fun v -> args := sv_of_string "PRE_CHOMP" :: sv_of_bool v :: !args) pre_chomp; may (fun v ->