Running internal python script from command line

The documentation says that the -P command-line argument can be used to run a Python script that’s stored inside a .blend file. However, when I follow the -P with the name of a text object inside the .blend file, it gives an IOError indicating it couldn’t find a file of that name. What is the syntax for running a script that’s stored inside a .blend file?