How to write perl code interfacing to RT


I have a genral question. I want to write a small perl web/db
application which should generate some tickets,
which will be linked. After looking for documentation I’m a liitle bit
confused which way to go.
I identified 3 alternatives:

1.) Utilize the CLI, which seems quite simple
2.) Use the api in a way like
3.) Try to understand the mystical way the CLI interfacing with the
RT/Apache process

I think for my requirements Nr. 2 will be okay, but I don’t find any
documentation (only the pod
stuff which is VERY rudimentary). So is there any documentation I don’t

Any comments and/or suggestions would be appreciated