Skip to content
This repository
tag: REL_5_4_3
Fetching contributors…

Cannot retrieve contributors at this time

file 24 lines (23 sloc) 0.795 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
# Copyright 2002-2007 Interchange Development Group and others
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. See the LICENSE file for details.
#
# $Id: rand.tag,v 1.4.2.1 2007-03-31 00:20:18 pajamian Exp $

UserTag rand Order file
UserTag rand posNumber 1
UserTag rand addAttr
UserTag rand hasEndTag
UserTag rand Version $Revision: 1.4.2.1 $
UserTag rand Routine <<EOR
sub {
my ($file, $opt, $inline) = @_;
my $sep = $opt->{separator} || '\[alt\]';
$inline = ::readfile($file)
if $file;
my @pieces = split /$sep/, $inline;
return $pieces[int(rand(scalar @pieces))] ;
}
EOR
Something went wrong with that request. Please try again.