upload module to CPAN (http client)

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello all.
I'm developing perl http and ftp clients and want to upload it to
CPAN. It's my very first time.  http://perldoc.perl.org/perlnewmod.html
told that it is good idea to discuss module with folk before upload.
So please point me to the right direction if I'm doing something
wrong. Here is short description :
- it works under linux
- based on EV and Coro
- support http/1.1, https, socks5
- several times faster than Coro::LWP

I think to prefix packages with "CTX" - meaning "context" since http
(and specially ftp) works in context - pass the cookies, understand
relative links, keep alive connections etc.
Here is file distribution:
  HTTP.pm   - CTX::HTTP - based on CTX::EV::HTTP and used Coro
  FTP.pm  - CTX::FTP (similar to CTX::HTTP)
    HTTP.pm   - CTX::EV::HTTP based on EV event loop, get
CTX::EV::Socket (or Socks5 ) as connection constructor (cc)
    FTP.pm    - CTX::EV::FTP similar to CTX::EV::HTTP
    Socket.pm  - CTX::EV::Socket - cc
    Socks5.pm - CTX::EV::Socks5, get CTX::EV::Socket or
CTX::EV::Socks5 as cc

The simple example bellow makes 100 requests simultaneously :

use strict;
use CTX::HTTP;

async {
    my $http = CTX::HTTP->new();
    my $resp = $http->get('http://www.example.com /');
    print "response code: ".$resp->code."\n";
}  foreach (1..100);


Re: upload module to CPAN (http client)

In article

Quoted text here. Click to load it

PAUSE has some naming advice. There's not much context for CTX, so you
might choose another top-level namespace :)


Re: upload module to CPAN (http client)

On 2011-02-05 17:09, brian d foy wrote:
Quoted text here. Click to load it

"pause.perl.org uses an invalid security certificate."


Re: upload module to CPAN (http client)

Quoted text here. Click to load it

It's signed by CAcert. Your browser probably doesn't have the root
certificate for that CA installed. You can get it from
http://www.cacert.org/index.php?id=3 . (or
https://www.cacert.org/index.php?id=3 but there your browser will
complain about an invalid certificate, too).


Re: upload module to CPAN (http client)

Quoted text here. Click to load it
ur browser will
Quoted text here. Click to load it

Thanks all for the links. let's see the variants.
First I need to decide should it be top-level namespace? my first
thought was yes, since I create a set of modules and  want to group it
under "one roof". And should it be descriptive name like CTX:: or
Multiple:: , Multi:: ; or can be like caption, brend name :) like
Loofort:: or some.
From the other hand it can be non top-level namespace. Maybe some
thing like NET::HTTP::Multy and NET::FTP::Multy. or this variant
Coro::Loofort:: or Coro::CTX::

It's hard to choose. currently I prefere the top-level namespace
Multy:: .
what you think?

Site Timeline