summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-01-24 13:11:31 +0100
committerYorhel <git@yorhel.nl>2020-01-24 13:11:31 +0100
commit495e03c42b378bfd5ee9bb0c431bac45c5e2b330 (patch)
tree200e27430a4d0fcc8a36dcf1f0ff4c4b79421adc /lib
parent82c838a5fb19897f4f50896be0c0eb089476fdbc (diff)
Use TUWF::XML's new xml_string()
Diffstat (limited to 'lib')
-rw-r--r--lib/VNWeb/Docs/Lib.pm15
-rw-r--r--lib/VNWeb/Prelude.pm4
2 files changed, 4 insertions, 15 deletions
diff --git a/lib/VNWeb/Docs/Lib.pm b/lib/VNWeb/Docs/Lib.pm
index eed1afc0..38b84421 100644
--- a/lib/VNWeb/Docs/Lib.pm
+++ b/lib/VNWeb/Docs/Lib.pm
@@ -6,22 +6,11 @@ use Text::MultiMarkdown 'markdown';
our @EXPORT = qw/md2html/;
-# Lets you call TUWF::XML functions and returns a string, doesn't affect any existing TUWF::XML outputs.
-# Nice idea for a TUWF::XML feature.
-sub lexicalxml(&) {
- my $f = shift;
- my $buf = '';
- local $TUWF::XML::OBJ = TUWF::XML->new(write => sub { $buf .= shift });
- $f->();
- $buf
-}
-
-
sub _moderators {
my $l = tuwf->dbAlli('SELECT id, username, perm FROM users WHERE (perm & ', \(auth->allPerms &~ auth->defaultPerms), ') > 0 ORDER BY id LIMIT 100');
my @modperms = grep 0 == (auth->listPerms->{$_} & auth->defaultPerms), keys auth->listPerms->%*;
- lexicalxml {
+ xml_string sub {
dl_ sub {
for my $u (@$l) {
dt_ sub { a_ href => "/u$u->{id}", $u->{username} };
@@ -40,7 +29,7 @@ sub _skincontrib {
my $u = tuwf->dbAlli('SELECT id, username FROM users WHERE id IN', [keys %users]);
- lexicalxml {
+ xml_string sub {
dl_ sub {
for my $u (@$u) {
dt_ sub { a_ href => "/u$u->{id}", $u->{username} };
diff --git a/lib/VNWeb/Prelude.pm b/lib/VNWeb/Prelude.pm
index 587e385d..e44703a6 100644
--- a/lib/VNWeb/Prelude.pm
+++ b/lib/VNWeb/Prelude.pm
@@ -4,7 +4,7 @@
# use warnings;
# use utf8;
#
-# use TUWF ':html5_', 'mkclass';
+# use TUWF ':html5_', 'mkclass', 'xml_string';
# use Exporter 'import';
# use Time::HiRes 'time';
# use List::Util 'min', 'max', 'sum';
@@ -48,7 +48,7 @@ sub import {
die $@ if !eval <<" EOM;";
package $c;
- use TUWF ':html5_', 'mkclass';
+ use TUWF ':html5_', 'mkclass', 'xml_string';
use Exporter 'import';
use Time::HiRes 'time';
use List::Util 'min', 'max', 'sum';