Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > upload module to CPAN (http client)

Reply
Thread Tools

upload module to CPAN (http client)

 
 
Loofort
Guest
Posts: n/a
 
      02-03-2011
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;
 
Reply With Quote
 
 
 
 
brian d foy
Guest
Posts: n/a
 
      02-05-2011
In article
<5964fa37-8869-43cd-a69e->,
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?A..._namingmodules
 
Reply With Quote
 
 
 
 
Dr.Ruud
Guest
Posts: n/a
 
      02-05-2011
On 2011-02-05 17:09, brian d foy wrote:
> In article
> <5964fa37-8869-43cd-a69e->,
> 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?A..._namingmodules


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

--
Ruud
 
Reply With Quote
 
Peter J. Holzer
Guest
Posts: n/a
 
      02-06-2011
On 2011-02-05 22:48, Dr.Ruud <rvtol+> wrote:
> On 2011-02-05 17:09, brian d foy wrote:
>> In article
>> <5964fa37-8869-43cd-a69e->,
>> 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?A..._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
 
Reply With Quote
 
Loofort
Guest
Posts: n/a
 
      02-08-2011
On 6 фев, 15:20, "Peter J. Holzer" <hjp-usen...@hjp.at> wrote:
> On 2011-02-05 22:48, Dr.Ruud <rvtol+use...@xs4all.nl> wrote:
>
> > On 2011-02-05 17:09, brian d foy wrote:
> >> In article
> >> <5964fa37-8869-43cd-a69e-37d1506d3...@r19g2000prm.googlegroups.com>,
> >> Loofort<loof...@gmail.com> Â*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?A..._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?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 2.6 What modules and extensions are available for Perl? What is CPAN? What does CPAN/src/... mean? PerlFAQ Server Perl Misc 0 01-24-2011 11:00 PM
on windows 7 / cygwin / perl / cpan - cannot make cpan work SVCitian Perl Misc 1 10-22-2010 03:59 PM
rt.cpan.org, search.cpan.org: why so unuseable? Ben Bullock Perl Misc 12 07-08-2008 12:51 PM
Is there a better way to search CPAN than search.cpan.org? usenet@DavidFilmer.com Perl Misc 5 10-12-2005 04:50 AM
Upgrading to CPAN.pm v1.76 install Bundle::CPAN fails carl d. Perl Misc 1 05-10-2005 09:35 PM



Advertisments
 



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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57