简体   繁体   中英

How do you use SOAP::Lite?

I am very new to linux and perl and I am trying to use SOAP::Lite as an API for ffencoderd, a daemon to convert my videos in background. I know I am probably doing something stupid but I read the documentation SOAP::Lite and is says to type use SOAP::Lite. I type into the terminal use SOAP::Lite and it says 'no command use'. So I try perl use SOAP::Lite and it says no directory use...Can someone give me some clarity here lol, I feel pretty dumb right now...

Your problem seems to be that you don't know Perl, rather then that you don't know SOAP::Lite. You might like to start with the Modern Perl book (in hard copy or a free ebook).

SOAP::Lite is a module, not an executable, so you don't run it directly from the command line.

use is part of the Perl language, not an executable, so again, you can't run it directly from the command line.

You could write a Perl one-liner that calls it

perl -MSOAP::Lite -E'your perl code here'

… but SOAP is sufficiently complicated that a one-liner almost certainly isn't what you are after.

You need to open a text file, put the standard Perl boilerplate at the top (a shebang line along with use strict; use warnings; ) and then write your program there (so you can save it).

#!/usr/bin/perl
use strict;
use warnings;
use SOAP::Lite;

then you can run the script you saved:

perl path/to/your.pl

Going from not knowing anything about Perl (which is, I assume, your current situation) to using complex modules like SOAP::Lite is a pretty big leap. I'd really recommend working your way up to it over a period of some months.

But if your requirement is more urgent, then my best advice would be to hire a Perl programmer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM