README
1NAME
2 XML::Literal - Syntax suppor for XML literals
3
4SYNOPSIS
5 # This is not a source filter: it just augments glob().
6 use XML::Simple;
7 use XML::Literal \&XMLin;
8
9 # Simple element
10 my $xml1 = <hr/>;
11
12 # With variable interpolation
13 my $xml2 = <input value='$ARGV[0]' />;
14
15 # With an extra pair of angle brackets
16 my $xml3 = < <a href='/'> Some Text </a> >;
17
18 # With escaped angle brackets
19 my $xml4 = <a href='/'\> Some Text \</a>;
20
21 # Direct call to the xml-building glob'' constructor
22 my $xml5 = glob'
23 <p><em>
24 Some Text
25 </em></p>
26 ';
27
28 # This does not look like XML, so it's still shell glob
29 my @files = <*.*>;
30
31DESCRIPTION
32 This module takes one function at its "use" line. Afterwards, all
33 single-line "<...>" calls that looks like a XML literal will be
34 processed with that function, instead of the built-in shell "glob".
35
36 Support for qx<...> overriding for multiline XML literals is planned for
37 Perl 5.10.
38
39AUTHORS
40 Audrey Tang <cpan@audreyt.org>
41
42COPYRIGHT (The "MIT" License)
43 Copyright 2006 by Audrey Tang <cpan@audreyt.org>.
44
45 Permission is hereby granted, free of charge, to any person obtaining a
46 copy of this software and associated documentation files (the
47 "Software"), to deal in the Software without restriction, including
48 without limitation the rights to use, copy, modify, merge, publish,
49 distribute, sublicense, and/or sell copies of the Software, and to
50 permit persons to whom the Software is fur- nished to do so, subject to
51 the following conditions:
52
53 The above copyright notice and this permission notice shall be included
54 in all copies or substantial portions of the Software.
55
56 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
57 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
58 MERCHANTABILITY, FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
59 IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
60 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
61 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
62 OTHER DEALINGS IN THE SOFTWARE.
63
64