The usage of perl2exe is pretty straightforward, the –help option gives only 7 options. For the sake of simplicity herewith only the most obvious and used one will be introduced - perl2exe.exe TheNameOfTheScript.pl produces TheNameOfTheScript.exe named executable, which in most of the simple tasks performed with Perl has exactly the same functionality as the perl script ran on the administrator’s workstation. Usually this type of conversation could be done via the command line, but sometimes there are time consuming error messages, error tracking, trying to redirect user input and other correspondent tweaks. For example there has been done a small fast code change and the script has not been validated for Perl errors, perl2exe in most of the cases will echo the perl echoed errors and if there is not the following approach integrates TextPad’s functionality as a coding editor turning it more into an IDE environment. It also redirects the (error) output straight to the coding editor so that one should be able to read it carefully and use it further. So from the interface of Textpad Configure- Preferences-Tools-Add-Dos command, typing cmd.exe and as Parameters the path to the perl2exe executable (if it is in the system path simple perl2exe is enough) followed by the –v option (standing for verbose output) and $FileName, which the TextPad’s own environmental variable for referring to the currently opened file. The “Save all documents first” check box should be checked and “Capture output” to redirect the (error) output of the executed conversation call into the TextPad’s command’s result window, which is an unsaved text file. Perl2exe reports its errors in the same way as Perl so the same regular expression to match the output could be applied: “^.+at (.+) line ([0-9]+)[.,]? “. Registers 1 for file and 2 for Line.
This would give the functionality to choose from the Tools menu perl2exe and convert the current perl script into an executable. This is still not faster enough in order to be “agile”, the next step will be to configure a shortcut for this command from the Configure-Preferences-Keyboard-Tools-perl2exe – a simple shortcut as Ctrl + 1 is agile enough. After all this the currently opened perl script could be converted into an executable with capturing the conversation process with the shortcut Ctrl +1 – if the developer is building a script 100 times per day by opening the cmd prompt typing the command, trying to tackle error messages … the time saving is obvious, so that the proposed method could be pointed as agile as the current software and hardware allow it.
If there is a bigger project containing more than one perl script, situated in one folder the whole process could be automated with a batch file. The idea of the batch file is to go trough all the perl scripts recursively and call the same command for each one of them, by capturing any possible error and allowing the user to jump to the error message straight from the Command results window in the Textpad.
Getting the Current TabItem when the Tab is not selected in WPF
-
[image: Banner]
This is a quick reminder to self on how to retrieve a TabItem from a WPF
TabControl *when the tab is not currently selected* because I ru...
1 week ago
No comments:
Post a Comment
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!