App-Mxpress-PDF
view release on metacpan or search on metacpan
public/javascripts/ace/ext-prompt.js view on Meta::CPAN
var commandMap = {};
editor.keyBinding.$handlers.forEach(function(handler) {
var ckb = handler.commandKeyBinding;
for (var i in ckb) {
var key = i.replace(/(^|-)\w/g, function(x) { return x.toUpperCase(); });
var commands = ckb[i];
if (!Array.isArray(commands))
commands = [commands];
commands.forEach(function(command) {
if (typeof command != "string")
command = command.name;
if (commandMap[command]) {
commandMap[command].key += "|" + key;
} else {
commandMap[command] = {key: key, command: command};
keybindings.push(commandMap[command]);
}
});
}
});
return keybindings;
};
});
define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"], function(require, exports, module) {
"use strict";
var Renderer = require("../virtual_renderer").VirtualRenderer;
var Editor = require("../editor").Editor;
var Range = require("../range").Range;
var event = require("../lib/event");
var lang = require("../lib/lang");
var dom = require("../lib/dom");
var $singleLineEditor = function(el) {
var renderer = new Renderer(el);
renderer.$maxLines = 4;
var editor = new Editor(renderer);
editor.setHighlightActiveLine(false);
editor.setShowPrintMargin(false);
editor.renderer.setShowGutter(false);
editor.renderer.setHighlightGutterLine(false);
editor.$mouseHandler.$focusTimeout = 0;
editor.$highlightTagPending = true;
return editor;
};
var AcePopup = function(parentNode) {
var el = dom.createElement("div");
var popup = new $singleLineEditor(el);
if (parentNode)
parentNode.appendChild(el);
el.style.display = "none";
popup.renderer.content.style.cursor = "default";
popup.renderer.setStyle("ace_autocomplete");
popup.setOption("displayIndentGuides", false);
popup.setOption("dragDelay", 150);
var noop = function(){};
popup.focus = noop;
popup.$isFocused = true;
popup.renderer.$cursorLayer.restartTimer = noop;
popup.renderer.$cursorLayer.element.style.opacity = 0;
popup.renderer.$maxLines = 8;
popup.renderer.$keepTextAreaAtCursor = false;
popup.setHighlightActiveLine(false);
popup.session.highlight("");
popup.session.$searchHighlight.clazz = "ace_highlight-marker";
popup.on("mousedown", function(e) {
var pos = e.getDocumentPosition();
popup.selection.moveToPosition(pos);
selectionMarker.start.row = selectionMarker.end.row = pos.row;
e.stop();
});
var lastMouseEvent;
var hoverMarker = new Range(-1,0,-1,Infinity);
var selectionMarker = new Range(-1,0,-1,Infinity);
selectionMarker.id = popup.session.addMarker(selectionMarker, "ace_active-line", "fullLine");
popup.setSelectOnHover = function(val) {
if (!val) {
hoverMarker.id = popup.session.addMarker(hoverMarker, "ace_line-hover", "fullLine");
} else if (hoverMarker.id) {
popup.session.removeMarker(hoverMarker.id);
hoverMarker.id = null;
}
};
popup.setSelectOnHover(false);
popup.on("mousemove", function(e) {
if (!lastMouseEvent) {
lastMouseEvent = e;
return;
}
if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) {
return;
}
lastMouseEvent = e;
lastMouseEvent.scrollTop = popup.renderer.scrollTop;
var row = lastMouseEvent.getDocumentPosition().row;
if (hoverMarker.start.row != row) {
if (!hoverMarker.id)
popup.setRow(row);
setHoverMarker(row);
}
});
popup.renderer.on("beforeRender", function() {
if (lastMouseEvent && hoverMarker.start.row != -1) {
lastMouseEvent.$pos = null;
var row = lastMouseEvent.getDocumentPosition().row;
if (!hoverMarker.id)
popup.setRow(row);
setHoverMarker(row, true);
}
});
popup.renderer.on("afterRender", function() {
var row = popup.getRow();
var t = popup.renderer.$textLayer;
var selected = t.element.childNodes[row - t.config.firstRow];
if (selected !== t.selectedNode && t.selectedNode)
dom.removeCssClass(t.selectedNode, "ace_selected");
public/javascripts/ace/ext-prompt.js view on Meta::CPAN
};
this.resolveVariables = function(snippet, editor) {
var result = [];
var indentation = "";
var afterNewLine = true;
for (var i = 0; i < snippet.length; i++) {
var ch = snippet[i];
if (typeof ch == "string") {
result.push(ch);
if (ch == "\n") {
afterNewLine = true;
indentation = "";
}
else if (afterNewLine) {
indentation = /^\t*/.exec(ch)[0];
afterNewLine = /\S/.test(ch);
}
continue;
}
if (!ch) continue;
afterNewLine = false;
if (ch.fmtString) {
var j = snippet.indexOf(ch, i + 1);
if (j == -1) j = snippet.length;
ch.fmt = snippet.slice(i + 1, j);
i = j;
}
if (ch.text) {
var value = this.getVariableValue(editor, ch.text, indentation) + "";
if (ch.fmtString)
value = this.tmStrFormat(value, ch, editor);
if (ch.formatFunction)
value = this.tmFormatFunction(value, ch, editor);
if (value && !ch.ifEnd) {
result.push(value);
gotoNext(ch);
} else if (!value && ch.ifEnd) {
gotoNext(ch.ifEnd);
}
} else if (ch.elseEnd) {
gotoNext(ch.elseEnd);
} else if (ch.tabstopId != null) {
result.push(ch);
} else if (ch.changeCase != null) {
result.push(ch);
}
}
function gotoNext(ch) {
var i1 = snippet.indexOf(ch, i + 1);
if (i1 != -1)
i = i1;
}
return result;
};
this.insertSnippetForSelection = function(editor, snippetText) {
var cursor = editor.getCursorPosition();
var line = editor.session.getLine(cursor.row);
var tabString = editor.session.getTabString();
var indentString = line.match(/^\s*/)[0];
if (cursor.column < indentString.length)
indentString = indentString.slice(0, cursor.column);
snippetText = snippetText.replace(/\r/g, "");
var tokens = this.tokenizeTmSnippet(snippetText);
tokens = this.resolveVariables(tokens, editor);
tokens = tokens.map(function(x) {
if (x == "\n")
return x + indentString;
if (typeof x == "string")
return x.replace(/\t/g, tabString);
return x;
});
var tabstops = [];
tokens.forEach(function(p, i) {
if (typeof p != "object")
return;
var id = p.tabstopId;
var ts = tabstops[id];
if (!ts) {
ts = tabstops[id] = [];
ts.index = id;
ts.value = "";
ts.parents = {};
}
if (ts.indexOf(p) !== -1)
return;
if (p.choices && !ts.choices)
ts.choices = p.choices;
ts.push(p);
var i1 = tokens.indexOf(p, i + 1);
if (i1 === -1)
return;
var value = tokens.slice(i + 1, i1);
var isNested = value.some(function(t) {return typeof t === "object";});
if (isNested && !ts.value) {
ts.value = value;
} else if (value.length && (!ts.value || typeof ts.value !== "string")) {
ts.value = value.join("");
}
});
tabstops.forEach(function(ts) {ts.length = 0;});
var expanding = {};
function copyValue(val) {
var copy = [];
for (var i = 0; i < val.length; i++) {
var p = val[i];
if (typeof p == "object") {
if (expanding[p.tabstopId])
continue;
var j = val.lastIndexOf(p, i - 1);
p = copy[j] || {tabstopId: p.tabstopId};
}
copy[i] = p;
}
return copy;
}
for (var i = 0; i < tokens.length; i++) {
var p = tokens[i];
if (typeof p != "object")
continue;
public/javascripts/ace/ext-prompt.js view on Meta::CPAN
this.insertSnippet = function(editor, snippetText) {
var self = this;
if (editor.inVirtualSelectionMode)
return self.insertSnippetForSelection(editor, snippetText);
editor.forEachSelection(function() {
self.insertSnippetForSelection(editor, snippetText);
}, null, {keepOrder: true});
if (editor.tabstopManager)
editor.tabstopManager.tabNext();
};
this.$getScope = function(editor) {
var scope = editor.session.$mode.$id || "";
scope = scope.split("/").pop();
if (scope === "html" || scope === "php") {
if (scope === "php" && !editor.session.$mode.inlinePhp)
scope = "html";
var c = editor.getCursorPosition();
var state = editor.session.getState(c.row);
if (typeof state === "object") {
state = state[0];
}
if (state.substring) {
if (state.substring(0, 3) == "js-")
scope = "javascript";
else if (state.substring(0, 4) == "css-")
scope = "css";
else if (state.substring(0, 4) == "php-")
scope = "php";
}
}
return scope;
};
this.getActiveScopes = function(editor) {
var scope = this.$getScope(editor);
var scopes = [scope];
var snippetMap = this.snippetMap;
if (snippetMap[scope] && snippetMap[scope].includeScopes) {
scopes.push.apply(scopes, snippetMap[scope].includeScopes);
}
scopes.push("_");
return scopes;
};
this.expandWithTab = function(editor, options) {
var self = this;
var result = editor.forEachSelection(function() {
return self.expandSnippetForSelection(editor, options);
}, null, {keepOrder: true});
if (result && editor.tabstopManager)
editor.tabstopManager.tabNext();
return result;
};
this.expandSnippetForSelection = function(editor, options) {
var cursor = editor.getCursorPosition();
var line = editor.session.getLine(cursor.row);
var before = line.substring(0, cursor.column);
var after = line.substr(cursor.column);
var snippetMap = this.snippetMap;
var snippet;
this.getActiveScopes(editor).some(function(scope) {
var snippets = snippetMap[scope];
if (snippets)
snippet = this.findMatchingSnippet(snippets, before, after);
return !!snippet;
}, this);
if (!snippet)
return false;
if (options && options.dryRun)
return true;
editor.session.doc.removeInLine(cursor.row,
cursor.column - snippet.replaceBefore.length,
cursor.column + snippet.replaceAfter.length
);
this.variables.M__ = snippet.matchBefore;
this.variables.T__ = snippet.matchAfter;
this.insertSnippetForSelection(editor, snippet.content);
this.variables.M__ = this.variables.T__ = null;
return true;
};
this.findMatchingSnippet = function(snippetList, before, after) {
for (var i = snippetList.length; i--;) {
var s = snippetList[i];
if (s.startRe && !s.startRe.test(before))
continue;
if (s.endRe && !s.endRe.test(after))
continue;
if (!s.startRe && !s.endRe)
continue;
s.matchBefore = s.startRe ? s.startRe.exec(before) : [""];
s.matchAfter = s.endRe ? s.endRe.exec(after) : [""];
s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : "";
s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : "";
return s;
}
};
this.snippetMap = {};
this.snippetNameMap = {};
this.register = function(snippets, scope) {
var snippetMap = this.snippetMap;
var snippetNameMap = this.snippetNameMap;
var self = this;
if (!snippets)
snippets = [];
function wrapRegexp(src) {
if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src))
src = "(?:" + src + ")";
return src || "";
}
function guardedRegexp(re, guard, opening) {
re = wrapRegexp(re);
guard = wrapRegexp(guard);
if (opening) {
re = guard + re;
if (re && re[re.length - 1] != "$")
re = re + "$";
} else {
re = re + guard;
if (re && re[0] != "^")
re = "^" + re;
}
return new RegExp(re);
}
function addSnippet(s) {
public/javascripts/ace/ext-prompt.js view on Meta::CPAN
var snippetManager = require("./snippets").snippetManager;
var config = require("./config");
var Autocomplete = function() {
this.autoInsert = false;
this.autoSelect = true;
this.exactMatch = false;
this.gatherCompletionsId = 0;
this.keyboardHandler = new HashHandler();
this.keyboardHandler.bindKeys(this.commands);
this.blurListener = this.blurListener.bind(this);
this.changeListener = this.changeListener.bind(this);
this.mousedownListener = this.mousedownListener.bind(this);
this.mousewheelListener = this.mousewheelListener.bind(this);
this.changeTimer = lang.delayedCall(function() {
this.updateCompletions(true);
}.bind(this));
this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50);
};
(function() {
this.$init = function() {
this.popup = new AcePopup(document.body || document.documentElement);
this.popup.on("click", function(e) {
this.insertMatch();
e.stop();
}.bind(this));
this.popup.focus = this.editor.focus.bind(this.editor);
this.popup.on("show", this.tooltipTimer.bind(null, null));
this.popup.on("select", this.tooltipTimer.bind(null, null));
this.popup.on("changeHoverMarker", this.tooltipTimer.bind(null, null));
return this.popup;
};
this.getPopup = function() {
return this.popup || this.$init();
};
this.openPopup = function(editor, prefix, keepPopupPosition) {
if (!this.popup)
this.$init();
this.popup.autoSelect = this.autoSelect;
this.popup.setData(this.completions.filtered, this.completions.filterText);
editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
var renderer = editor.renderer;
this.popup.setRow(this.autoSelect ? 0 : -1);
if (!keepPopupPosition) {
this.popup.setTheme(editor.getTheme());
this.popup.setFontSize(editor.getFontSize());
var lineHeight = renderer.layerConfig.lineHeight;
var pos = renderer.$cursorLayer.getPixelPosition(this.base, true);
pos.left -= this.popup.getTextLeftOffset();
var rect = editor.container.getBoundingClientRect();
pos.top += rect.top - renderer.layerConfig.offset;
pos.left += rect.left - editor.renderer.scrollLeft;
pos.left += renderer.gutterWidth;
this.popup.show(pos, lineHeight);
} else if (keepPopupPosition && !prefix) {
this.detach();
}
};
this.detach = function() {
this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
this.editor.off("changeSelection", this.changeListener);
this.editor.off("blur", this.blurListener);
this.editor.off("mousedown", this.mousedownListener);
this.editor.off("mousewheel", this.mousewheelListener);
this.changeTimer.cancel();
this.hideDocTooltip();
this.gatherCompletionsId += 1;
if (this.popup && this.popup.isOpen)
this.popup.hide();
if (this.base)
this.base.detach();
this.activated = false;
this.completions = this.base = null;
};
this.changeListener = function(e) {
var cursor = this.editor.selection.lead;
if (cursor.row != this.base.row || cursor.column < this.base.column) {
this.detach();
}
if (this.activated)
this.changeTimer.schedule();
else
this.detach();
};
this.blurListener = function(e) {
var el = document.activeElement;
var text = this.editor.textInput.getElement();
var fromTooltip = e.relatedTarget && this.tooltipNode && this.tooltipNode.contains(e.relatedTarget);
var container = this.popup && this.popup.container;
if (el != text && el.parentNode != container && !fromTooltip
&& el != this.tooltipNode && e.relatedTarget != text
) {
this.detach();
}
};
this.mousedownListener = function(e) {
this.detach();
};
this.mousewheelListener = function(e) {
this.detach();
};
this.goTo = function(where) {
this.popup.goTo(where);
};
this.insertMatch = function(data, options) {
if (!data)
data = this.popup.getData(this.popup.getRow());
if (!data)
return false;
if (data.completer && data.completer.insertMatch) {
data.completer.insertMatch(this.editor, data);
} else {
if (this.completions.filterText) {
var ranges = this.editor.selection.getAllRanges();
for (var i = 0, range; range = ranges[i]; i++) {
range.start.column -= this.completions.filterText.length;
this.editor.session.remove(range);
}
}
if (data.snippet)
snippetManager.insertSnippet(this.editor, data.snippet);
else
this.editor.execCommand("insertstring", data.value || data);
}
this.detach();
};
this.commands = {
"Up": function(editor) { editor.completer.goTo("up"); },
"Down": function(editor) { editor.completer.goTo("down"); },
public/javascripts/ace/ext-prompt.js view on Meta::CPAN
if (!caption) continue;
var lastIndex = -1;
var matchMask = 0;
var penalty = 0;
var index, distance;
if (this.exactMatch) {
if (needle !== caption.substr(0, needle.length))
continue loop;
} else {
var fullMatchIndex = caption.toLowerCase().indexOf(lower);
if (fullMatchIndex > -1) {
penalty = fullMatchIndex;
} else {
for (var j = 0; j < needle.length; j++) {
var i1 = caption.indexOf(lower[j], lastIndex + 1);
var i2 = caption.indexOf(upper[j], lastIndex + 1);
index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2;
if (index < 0)
continue loop;
distance = index - lastIndex - 1;
if (distance > 0) {
if (lastIndex === -1)
penalty += 10;
penalty += distance;
matchMask = matchMask | (1 << j);
}
lastIndex = index;
}
}
}
item.matchMask = matchMask;
item.exactMatch = penalty ? 0 : 1;
item.$score = (item.score || 0) - penalty;
results.push(item);
}
return results;
};
}).call(FilteredList.prototype);
exports.Autocomplete = Autocomplete;
exports.FilteredList = FilteredList;
});
define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
'use strict';
var dom = require("../../lib/dom");
var cssText = "#ace_settingsmenu, #kbshortcutmenu {\
background-color: #F7F7F7;\
color: black;\
box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\
padding: 1em 0.5em 2em 1em;\
overflow: auto;\
position: absolute;\
margin: 0;\
bottom: 0;\
right: 0;\
top: 0;\
z-index: 9991;\
cursor: default;\
}\
.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\
box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\
background-color: rgba(255, 255, 255, 0.6);\
color: black;\
}\
.ace_optionsMenuEntry:hover {\
background-color: rgba(100, 100, 100, 0.1);\
transition: all 0.3s\
}\
.ace_closeButton {\
background: rgba(245, 146, 146, 0.5);\
border: 1px solid #F48A8A;\
border-radius: 50%;\
padding: 7px;\
position: absolute;\
right: -8px;\
top: -8px;\
z-index: 100000;\
}\
.ace_closeButton{\
background: rgba(245, 146, 146, 0.9);\
}\
.ace_optionsMenuKey {\
color: darkslateblue;\
font-weight: bold;\
}\
.ace_optionsMenuCommand {\
color: darkcyan;\
font-weight: normal;\
}\
.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\
vertical-align: middle;\
}\
.ace_optionsMenuEntry button[ace_selected_button=true] {\
background: #e7e7e7;\
box-shadow: 1px 0px 2px 0px #adadad inset;\
border-color: #adadad;\
}\
.ace_optionsMenuEntry button {\
background: white;\
border: 1px solid lightgray;\
margin: 0px;\
}\
.ace_optionsMenuEntry button:hover{\
background: #f0f0f0;\
}";
dom.importCssString(cssText);
module.exports.overlayPage = function overlayPage(editor, contentElement, callback) {
var closer = document.createElement('div');
var ignoreFocusOut = false;
function documentEscListener(e) {
if (e.keyCode === 27) {
close();
}
}
function close() {
public/javascripts/ace/ext-prompt.js view on Meta::CPAN
"Ctrl-Up|Ctrl-Home": function(editor) { popup.goTo("start"); valueFromRecentList();},
"Ctrl-Down|Ctrl-End": function(editor) { popup.goTo("end"); valueFromRecentList();},
"Tab": function(editor) {
popup.goTo("down"); valueFromRecentList();
},
"PageUp": function(editor) { popup.gotoPageUp(); valueFromRecentList();},
"PageDown": function(editor) { popup.gotoPageDown(); valueFromRecentList();}
});
}
cmdLine.commands.bindKeys(keys);
function done() {
overlay.close();
callback && callback();
openPrompt = null;
}
cmdLine.on("input", function() {
options.onInput && options.onInput();
updateCompletions();
});
function updateCompletions() {
if (options.getCompletions) {
var prefix;
if (options.getPrefix) {
prefix = options.getPrefix(cmdLine);
}
var completions = options.getCompletions(cmdLine);
popup.setData(completions, prefix);
popup.resize(true);
}
}
function valueFromRecentList() {
var current = popup.getData(popup.getRow());
if (current && !current.error)
return current.value || current.caption || current;
}
cmdLine.resize(true);
if (popup) {
popup.resize(true);
}
cmdLine.focus();
openPrompt = {
close: done,
name: options.name,
editor: editor
};
}
prompt.gotoLine = function(editor, callback) {
function stringifySelection(selection) {
if (!Array.isArray(selection))
selection = [selection];
return selection.map(function(r) {
var cursor = r.isBackwards ? r.start: r.end;
var anchor = r.isBackwards ? r.end: r.start;
var row = anchor.row;
var s = (row + 1) + ":" + anchor.column;
if (anchor.row == cursor.row) {
if (anchor.column != cursor.column)
s += ">" + ":" + cursor.column;
} else {
s += ">" + (cursor.row + 1) + ":" + cursor.column;
}
return s;
}).reverse().join(", ");
}
prompt(editor, ":" + stringifySelection(editor.selection.toJSON()), {
name: "gotoLine",
selection: [1, Number.MAX_VALUE],
onAccept: function(data) {
var value = data.value;
var _history = prompt.gotoLine._history;
if (!_history)
prompt.gotoLine._history = _history = [];
if (_history.indexOf(value) != -1)
_history.splice(_history.indexOf(value), 1);
_history.unshift(value);
if (_history.length > 20) _history.length = 20;
var pos = editor.getCursorPosition();
var ranges = [];
value.replace(/^:/, "").split(/,/).map(function(str) {
var parts = str.split(/([<>:+-]|c?\d+)|[^c\d<>:+-]+/).filter(Boolean);
var i = 0;
function readPosition() {
var c = parts[i++];
if (!c) return;
if (c[0] == "c") {
var index = parseInt(c.slice(1)) || 0;
return editor.session.doc.indexToPosition(index);
}
var row = pos.row;
var column = 0;
if (/\d/.test(c)) {
row = parseInt(c) - 1;
c = parts[i++];
}
if (c == ":") {
c = parts[i++];
if (/\d/.test(c)) {
column = parseInt(c) || 0;
}
}
return {row: row, column: column};
}
pos = readPosition();
var range = Range.fromPoints(pos, pos);
if (parts[i] == ">") {
i++;
range.end = readPosition();
}
else if (parts[i] == "<") {
i++;
range.start = readPosition();
}
ranges.unshift(range);
});
editor.selection.fromJSON(ranges);
var scrollTop = editor.renderer.scrollTop;
editor.renderer.scrollSelectionIntoView(
editor.selection.anchor,
editor.selection.cursor,
0.5
);
editor.renderer.animateScrolling(scrollTop);
},
history: function() {
var undoManager = editor.session.getUndoManager();
if (!prompt.gotoLine._history)
return [];
return prompt.gotoLine._history;
},
getCompletions: function(cmdLine) {
var value = cmdLine.getValue();
var m = value.replace(/^:/, "").split(":");
var row = Math.min(parseInt(m[0]) || 1, editor.session.getLength()) - 1;
var line = editor.session.getLine(row);
var current = value + " " + line;
return [current].concat(this.history());
},
$rules: {
start: [{
regex: /\d+/,
token: "string"
}, {
regex: /[:,><+\-c]/,
token: "keyword"
}]
}
});
};
prompt.commands = function(editor, callback) {
function normalizeName(name) {
return (name || "").replace(/^./, function(x) {
return x.toUpperCase(x);
}).replace(/[a-z][A-Z]/g, function(x) {
return x[0] + " " + x[1].toLowerCase(x);
});
}
function getEditorCommandsByName(excludeCommands) {
var commandsByName = [];
var commandMap = {};
editor.keyBinding.$handlers.forEach(function(handler) {
var platform = handler.platform;
var cbn = handler.byName;
for (var i in cbn) {
var key;
if (cbn[i].bindKey && cbn[i].bindKey[platform] !== null) {
key = cbn[i].bindKey["win"];
} else {
key = "";
}
var commands = cbn[i];
var description = commands.description || normalizeName(commands.name);
if (!Array.isArray(commands))
commands = [commands];
commands.forEach(function(command) {
if (typeof command != "string")
command = command.name;
( run in 0.633 second using v1.01-cache-2.11-cpan-39bf76dae61 )