File Coverage

blib/lib/WebEditor/OldFeatures/SystemExplorer.pm
Criterion Covered Total %
statement 9 19 47.3
branch 0 4 0.0
condition n/a
subroutine 3 5 60.0
pod 0 2 0.0
total 12 30 40.0


line stmt bran cond sub pod time code
1             # -*- perl -*-
2              
3             #
4             # $Id: SystemExplorer.pm,v 1.1 2004/04/01 17:08:53 eserte Exp $
5             # Author: Slaven Rezic
6             #
7             # Copyright (C) 2004 Slaven Rezic. All rights reserved.
8             # This package is free software; you can redistribute it and/or
9             # modify it under the same terms as Perl itself.
10             #
11             # Mail: eserte@users.sourceforge.net
12             # WWW: http://www.sourceforge.net/projects/we-framework
13             #
14              
15             package WebEditor::OldFeatures::SystemExplorer;
16              
17             =head1 NAME
18              
19             WebEditor::OldFeatures::SystemExplorer -
20              
21             =head1 SYNOPSIS
22              
23              
24             =head1 DESCRIPTION
25              
26              
27             =head1 AUTHOR
28              
29             Slaven Rezic.
30              
31             =cut
32              
33 1     1   1046 use strict;
  1         3  
  1         44  
34 1     1   4 use vars qw($VERSION);
  1         2  
  1         63  
35             $VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/);
36              
37 1     1   5 use mixin::with 'WebEditor::OldController';
  1         2  
  1         5  
38              
39 0     0 0   sub WebEditor_SystemExplorer_Class { "WebEditor::SystemExplorer" }
40              
41             sub systemexplorer {
42 0     0 0   my $self = shift;
43 0           $self->identify;
44 0           my $root = $self->Root;
45 0 0         if (!$root->is_allowed(["admin"])) {
46 0           die "This function is only allowed for users with admin rights\n";
47             }
48 0           eval qq{ require } . $self->WebEditor_SystemExplorer_Class;
49 0 0         die $@ if $@;
50 0           my $se = $self->WebEditor_SystemExplorer_Class->new($self);
51 0           $se->dispatch;
52             }
53              
54             1;