Fix previous pull request

1. Added test for script or package must be set, when use own perl code
2.Test for own code