File: blended.pl

package info (click to toggle)
libnet-amazon-perl 0.35-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 908 kB
  • ctags: 160
  • sloc: xml: 4,821; perl: 2,055; makefile: 46
file content (25 lines) | stat: -rwxr-xr-x 511 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/perl
###########################################
use warnings;
use strict;

use Net::Amazon;
use Net::Amazon::Request::Blended;

use Log::Log4perl qw(:easy);
Log::Log4perl->easy_init($DEBUG);

my $ua = Net::Amazon->new(token => 'AMAZON_TOKEN');
my $response = $ua->search(blended => ($ARGV[0] || "Perl"));

if($response->is_success()) {
    print $response->total_results(), "\n";
}

__END__

my @properties = $response->properties();

foreach (@properties) {
        print $_->as_string() . "\n";
}