]> git.proxmox.com Git - pve-apiclient.git/blobdiff - examples/example1.pl
example2.pl: add a second example
[pve-apiclient.git] / examples / example1.pl
index b0fedeedb4cdd405f24b583c484fe365e8f8c7c1..7f7b34445f08c8303e6ff66309dfca11c16a1ae1 100755 (executable)
@@ -1,9 +1,11 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 # NOTE: you need to run this on a PVE host, or modify the source to
 # provide username/password/hostname from somewhere else.
 
 use strict;
+use warnings;
+
 use PVE::APIClient::LWP;
 
 use PVE::AccessControl;
@@ -29,6 +31,6 @@ my $conn = PVE::APIClient::LWP->new(
     manual_verification => 1,
     );
 
-my $res = $conn->get("api2/json/", {});
+my $res = $conn->get("/", {});
 
 print to_json($res, { pretty => 1, canonical => 1});