~kosova/+junk/tuxfamily-twiki

« back to all changes in this revision

Viewing changes to foswiki/lib/Foswiki/Query/OP_lc.pm

  • Committer: James Michael DuPont
  • Date: 2009-07-18 19:58:49 UTC
  • Revision ID: jamesmikedupont@gmail.com-20090718195849-vgbmaht2ys791uo2
added foswiki

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# See bottom of file for copyright and license details
 
2
 
 
3
=begin TML
 
4
 
 
5
---+ package Foswiki::Query::OP_lc
 
6
 
 
7
=cut
 
8
 
 
9
package Foswiki::Query::OP_lc;
 
10
use base 'Foswiki::Query::UnaryOP';
 
11
 
 
12
use strict;
 
13
 
 
14
sub new {
 
15
    my $class = shift;
 
16
 
 
17
    return $class->SUPER::new(
 
18
        name        => 'lc',
 
19
        prec        => 600,
 
20
        casematters => 1
 
21
    );
 
22
}
 
23
 
 
24
sub evaluate {
 
25
    my $this = shift;
 
26
    my $node = shift;
 
27
    return $this->evalUnary( $node, sub { lc(shift) }, @_ );
 
28
}
 
29
 
 
30
1;
 
31
 
 
32
__DATA__
 
33
 
 
34
Module of Foswiki - The Free and Open Source Wiki, http://foswiki.org/, http://Foswiki.org/
 
35
 
 
36
# Copyright (C) 2008 Foswiki Contributors. All Rights Reserved.
 
37
# Foswiki Contributors are listed in the AUTHORS file in the root
 
38
# of this distribution. NOTE: Please extend that file, not this notice.
 
39
#
 
40
# Additional copyrights apply to some or all of the code in this
 
41
# file as follows:
 
42
#
 
43
# Copyright (C) 2005-2007 TWiki Contributors. All Rights Reserved.
 
44
# TWiki Contributors are listed in the AUTHORS file in the root
 
45
# of this distribution. NOTE: Please extend that file, not this notice.
 
46
#
 
47
This program is free software; you can redistribute it and/or
 
48
modify it under the terms of the GNU General Public License
 
49
as published by the Free Software Foundation; either version 2
 
50
of the License, or (at your option) any later version. For
 
51
more details read LICENSE in the root of this distribution.
 
52
 
 
53
This program is distributed in the hope that it will be useful,
 
54
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
55
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
56
 
 
57
As per the GPL, removal of this notice is prohibited.
 
58
 
 
59
Author: Crawford Currie http://c-dot.co.uk