upload module to CPAN (http client)

Discussion in 'Perl Misc' started by Loofort, Feb 3, 2011.

  1. Loofort

    Loofort Guest

    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:
    CTX/
    HTTP.pm - CTX::HTTP - based on CTX::EV::HTTP and used Coro
    FTP.pm - CTX::FTP (similar to CTX::HTTP)
    EV/
    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
    FTP/
    Command.pm
    Data.pm
    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);

    EV::loop;
     
    Loofort, Feb 3, 2011
    #1
    1. Advertising

  2. Loofort

    brian d foy Guest

    In article
    <>,
    Loofort <> wrote:

    > 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.


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

    https://pause.perl.org/pause/query?ACTION=pause_namingmodules
     
    brian d foy, Feb 5, 2011
    #2
    1. Advertising

  3. Loofort

    Dr.Ruud Guest

    On 2011-02-05 17:09, brian d foy wrote:
    > In article
    > <>,
    > Loofort<> wrote:


    >> 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.

    >
    > PAUSE has some naming advice. There's not much context for CTX, so you
    > might choose another top-level namespace :)
    >
    > https://pause.perl.org/pause/query?ACTION=pause_namingmodules


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

    --
    Ruud
     
    Dr.Ruud, Feb 5, 2011
    #3
  4. On 2011-02-05 22:48, Dr.Ruud <> wrote:
    > On 2011-02-05 17:09, brian d foy wrote:
    >> In article
    >> <>,
    >> Loofort<> wrote:

    >
    >>> 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.

    >>
    >> PAUSE has some naming advice. There's not much context for CTX, so you
    >> might choose another top-level namespace :)
    >>
    >> https://pause.perl.org/pause/query?ACTION=pause_namingmodules

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



    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).

    hp
     
    Peter J. Holzer, Feb 6, 2011
    #4
  5. Loofort

    Loofort Guest

    On 6 фев, 15:20, "Peter J. Holzer" <> wrote:
    > On 2011-02-05 22:48, Dr.Ruud <> wrote:
    >
    > > On 2011-02-05 17:09, brian d foy wrote:
    > >> In article
    > >> <>,
    > >> Loofort<>  wrote:

    >
    > >>> 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.

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

    >
    > >>https://pause.perl.org/pause/query?ACTION=pause_namingmodules

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

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



    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?
     
    Loofort, Feb 8, 2011
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. carl d.
    Replies:
    1
    Views:
    386
    A. Sinan Unur
    May 10, 2005
  2. Replies:
    5
    Views:
    206
    Randy Kobes
    Oct 12, 2005
  3. Ben Bullock
    Replies:
    12
    Views:
    287
    Ben Bullock
    Jul 8, 2008
  4. SVCitian
    Replies:
    1
    Views:
    941
    SVCitian
    Oct 22, 2010
  5. PerlFAQ Server
    Replies:
    0
    Views:
    169
    PerlFAQ Server
    Jan 24, 2011
Loading...

Share This Page