Using Squish functions in your own Perl modules

Last edited on

Overview

Here is an example of how you can use your own Perl modules in Squish:

use TestPackage::testPackage1;

sub main {
    testPackage1::printMessage();
    test::log("hello");
}
test.pl

As the Squish functions are defined in the global scope of the Perl interpreter and with the default package being main, the functions can be accessed using a fully qualified name as shown below.

package testPackage1;

sub printMessage{
    main::startApplication("addressbook");
    test::log("Application Started");
}

1;
testPackage1.pm