With Mac::OSA, you can get the source of the compiled OSA script (such as AppleScript) that you are working with (unless it was saved without the source).
But even on Mac OS X, it is returned with Mac newlines, CR, instead of Unix newlines, LF. Even if the input source was with Unix newlines.