Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Here's something I've put together as an early example for my chapter on using the toolkits (the one that will introduce each of the SOAP and SOAP::Lite packages, before moving on to bigger code). This'll do until we get "native" RSS feeds of individual journal. :-)

    OK, scratch that. Getting the code to look right in preview is killing me. Instead, pull it down from here [blackperl.com]. Pudge, if you tell me how to make my code look purdy like yours, I'll update this...

    --rjray

    --

    --rjray

    • I've been holding off announcing it, but use the pseudotag <ECODE>. It still needs some work, and has some caveats, which I hope to deal with and announce soon.
      • Let's give it a try, then... here 'tis:


        #!/usr/bin/perl -w

        use strict;

        use SOAP::Lite;
        use XML::RSS;

        my $user = shift ||
            die "Usage: $0 userID [ usernick ]\n\nStopped";
        my $nick = shift || "#$user";

        my $host        = 'use.perl.org';
        my $uri         = "http://$host/Slash/Journal/SOAP";
        my $proxy       = "http://$host/journal.pl";

        my $journal = SOAP::Lite->uri($uri)->proxy($proxy);
        my $results = $journal->get_entries($user, 15)->result;
        my $rss     = XML::RSS->new(version => '1.0');

        $rss->channel(title       => "use.perl.org journal of $nick",
                      'link'      => $proxy,
                      description => "The use.perl.org journal of $nick");
        $rss->add_item(title  => $_->{subject}, 'link' => $_->{url})
            for (@$results);

        print STDOUT $rss->as_string;

        __END__

        (Looks much better in preview, thanks...)

        --rjray

        --

        --rjray