Method for configuring non-script language library files to be run as scripts
AssigneeHewlett-Packard Development Company, L.P.
InventorMatthew P. Potts
Life of this patent
Estimating the term…
Abstract
The preferred embodiment of the present invention comprises writing a script to perform a function defined in a subroutine in a library file, which is written in such a way that code that actually runs the subroutine is hidden in the file and is conditionally available to run the subroutine. Running the subroutine enables one to determine if it functions as expected.
Claims10
A method for creating a computer programming library file containing at least one subroutine for performing a function, the function being used in a non-script programming language or the function being run as a script in a script programming language, comprising the steps of:
- creating a library file having a predetermined given name in a predetermined program file;
- creating at least one subroutine having a name identical to said predetermined name of said library file;
- creating code configured to test the operability of said created at least one subroutine, said code being placed in said library file and being executable only when a name of said predetermined program file matches said name of said created at least one subroutine.
A method of creating and selectively using a library file having at least one subroutine in a non-script programming language and in a script programming language, comprising the steps of
- creating a library file having a predetermined given name, said library file being produced in a predetermined program file;
- creating the at least one subroutine having a name identical to said predetermined given name of said library file;
- creating code configured to test the operability of said created at least one subroutine, said code being placed in said library file;
- creating code for running said test code under predetermined conditions;
- responsive to a run command being initiated, determining if the run command was initiated from said predetermined program file and running said test code as a script if a program file name matches the created subroutine file name and calling said library file in said non-script language if the program file name fails to match said subroutine file name.
A method for creating a first computer programming library file containing at least one subroutine for performing a function, the function being used in a non-script programming language or the function being run as a script in a script programming language, comprising the steps of:
- creating a library file having a predetermined given name and useful in a predetermined program;
- creating the at least one subroutine having a name identical to said predetermined name of said library file;
- creating test code configured to be selectively run as a script to test the operability of said created at least one subroutine, said test code being located in said first library file and being executable only if said created at least one subroutine is called from said predetermined program.
A library file stored on a computer-readable medium for execution by a computer, having a predetermined name and at least one subroutine with a name identical to said predetermined name of said library file, that can be used in non-script programs and in multiple script programs wherein the operability of the subroutine can be determined in any program in which it is imported or otherwise used, said library file comprising:
- a subroutine for performing a function in a script program or in a non-script program;
- code hidden in said library file for testing the operability of said subroutine;
- thereby enabling a programmer to execute the hidden test code to determine the operability of said subroutine in any application in which it is used, the test code being run as a script when a run command is initiated and only when said predetermined name of said library file matches said name of said at least one subroutine.
Dependencies are inferred from the claim text.