Re: CPAN Test Data
No directly, but it could be. The only place it exists as a single thing is in the MySQL database that tester.cpan.org works from. Graham. On Mon, May 14, 2001 at 03:27:56PM -0400, Adam Turoff wrote: > Is the data used for testers.cpan.org available anywhere in one > comprehensive chunk? > > I looked around testers.cpan.org, and from what I can tell, it's > only available in a pre-digested report format. Surely it's > reconstructable from the cpan-testers archive, but anywhere else? > > Thanks, > > Z. >
Re: ANNOUNCE - Test::More no_plan, Pod::Tests useful!
On Wed, Jun 13, 2001 at 04:56:51PM -0400, [EMAIL PROTECTED] wrote: > On Wed, Jun 13, 2001 at 07:36:15PM +0200, H.Merijn Brand wrote: > > > use Test::More no_plan; > > > > no bare words, please ;-) > > > > use Test::More qw(no_plan); > > I had started to add qw() to all my docs, but oddly enough nothing > seems to have a problem with that bareword. And it looks better > withou the qw() *shrug* Then try this use strict; use Test::More no_plan; Graham.
Re: [PATCH lib/Net/Config.pm, MANIFEST, t/lib/Mock/Socket.pm, lib/Net/Config.t] Add Tests for Net::Config
Any patches to modules from libnet, and test additions, should be against the latest libnet on CPAN, I do not want the core to diverge. So if a test depends on a module in the core it should check that the module is avaliable, so that the test is skipped with older perl releases. Graham. On Sat, Oct 20, 2001 at 01:32:01AM -0600, chromatic wrote: > Here's a test suite for Net::Config. In the process of writing this, I've > fixed an apparent bug that prevented single values from becoming array > references when necessary. I think it's right, but perhaps Graham should weigh > in on this. > > In the process, with some advice from perl-qa, I've added a mock object so the > test could control the output of Socket::inet_ntoa() and Socket::inet_aton(). > t/lib/Mock/ seemed like as good a place as any. > > I'm happy to rework this patch if it personally offends anyone whose opinion > matters. :) > > -- c > > --- lib/Net/~Config.pmSat Oct 20 01:23:46 2001 > +++ lib/Net/Config.pm Sat Oct 20 01:23:54 2001 > @@ -13,7 +13,7 @@ > > @EXPORT = qw(%NetConfig); > @ISA = qw(Net::LocalCfg Exporter); > -$VERSION = "1.05"; # $Id: //depot/libnet/Net/Config.pm#9 $ > +$VERSION = "1.06"; # $Id: //depot/libnet/Net/Config.pm#9 $ > > eval { local $SIG{__DIE__}; require Net::LocalCfg }; > > @@ -54,11 +54,11 @@ > } > my ($k,$v); > while(($k,$v) = each %NetConfig) { > -$v = [ $v ] > - if($k =~ /_hosts$/ && !ref($v)); > + $NetConfig{$k} = [ $v ] > + if($k =~ /_hosts$/ && !ref($v)); > } > > -# Take a hostname and determine if it is inside te firewall > +# Take a hostname and determine if it is inside the firewall > > sub requires_firewall { > shift; # ignore package > --- ~MANIFEST Sat Oct 20 01:24:04 2001 > +++ MANIFEST Sat Oct 20 01:24:42 2001 > @@ -1065,6 +1065,7 @@ > lib/Net/Cmd.pm libnet > lib/Net/Config.eglibnet > lib/Net/Config.pmlibnet > +lib/Net/Config.pmlibnet (see if Net::Config works) > lib/Net/demos/ftplibnet > lib/Net/demos/inetd libnet > lib/Net/demos/nntp libnet > --- /dev/null Thu Aug 30 03:54:37 2001 > +++ t/lib/Mock/Socket.pm Sat Oct 20 00:02:49 2001 > @@ -0,0 +1,31 @@ > +package Mock::Socket; > + > +# this is not the package you're looking for > + > +package Socket; > + > +$INC{'Socket.pm'} = 1; > + > +use Exporter; > +@Socket::ISA = ( 'Exporter' ); > +@EXPORT = qw( &inet_aton &inet_ntoa ); > + > +my (%aton, %ntoa); > + > +sub set_dns { > + while (my ($name, $number) = splice(@_, 0, 2)) { > + my $packed = unpack( "N", pack("C*", split(/\./, $number))); > + $aton{$name} = $packed; > + $ntoa{$packed} = $number; > + } > +} > + > +sub inet_aton { > + return $aton{$_[0]}; > +} > + > +sub inet_ntoa { > + return $ntoa{$_[0]}; > +} > + > +1; > --- /dev/null Thu Aug 30 03:54:37 2001 > +++ lib/Net/Config.t Sat Oct 20 01:18:50 2001 > @@ -0,0 +1,85 @@ > +#!./perl > + > +BEGIN { > + chdir 't' if -d 't'; > + @INC = ( 'lib', '../lib' ); > +} > + > +# lots of magic, see t/lib/Mock/Socket > +use Mock::Socket; > +use Test::More tests => 14; > + > +use_ok( 'Net::Config' ); > +ok( keys %NetConfig, '%NetConfig should be imported' ); > + > +undef $NetConfig{'ftp_firewall'}; > +is( Net::Config->requires_firewall, 0, > + 'requires_firewall() should return 0 without ftp_firewall defined' ); > + > +# this calls inet_aton in the mock Socket, so it *may* not be portable > +$NetConfig{'ftp_firewall'} = 1; > +is( Net::Config->requires_firewall, -1, > + '... should return -1 without a valid hostname' ); > + > +# use the mock Socket to resolve addresses our way > +Socket::set_dns( localhost => '127.0.0.1', remotehost => '192.168.10.0' ); > +delete $NetConfig{'local_netmask'}; > +is( Net::Config->requires_firewall('localhost'), 0, > + '... should return 0 without local_netmask defined' ); > + > +# > +$NetConfig{'local_netmask'} = '127.0.0.1/24'; > +is( Net::Config->requires_firewall('localhost'), 0, > + '... should return false if host is within netmask' ); > +is( Net::Config->requires_firewall('remotehost'), 1, > + '... should return true if host is outside netmask' ); > + > +# now try more netmasks > +Socket::set_dns( otherlocal => '10.10.255.254' ); > +$NetConfig{'local_netmask'} = [ '127.0.0.1/24', '10.0.0.0/8' ]; > +is( Net::Config->requires_firewall('otherlocal'), 0, > + '... should find success with mutiple local netmasks' ); > +is( Net::Config->requires_firewall('remotehost'), 1, > + '... should handle failure with multiple local netmasks' ); > + > +# now fool Perl into compiling this again. HEY, LOOK OVER THERE! > +my $path = $INC{'Net/Config.pm'}; > +delete $INC{'Net/Config.pm'}; > + > +# Net::Config populates %NetConfig from 'libnet.cfg', if possible > +my $wrote_file = 0; > + > +(my $cfgfile = $path) =~ s/Config.pm/libnet.cfg/; > +if (open(OUT, '>' . $cfgfile)) { > + use Data::Du
Re: [PATCH lib/Net/Config.pm, MANIFEST, t/lib/Mock/Socket.pm, lib/Net/Config.t] Add Tests for Net::Config
On Mon, Oct 22, 2001 at 02:14:43PM -0600, chromatic wrote: > On Monday 22 October 2001 14:13, Graham Barr wrote: > > > > I understood that as Graham being unsure about using Test::More in the > > > tests. > > > Actually I was refering to Mock::Socket > > Would you be amenable to a patch that moves that into the .t file? That would be OK. Although if you intend other tests to use it I would place it into t/common.pl and require it in the test > There's no technical reason it has to be a module. I just wrote it that way, > thinking it might be expandable and reusable. That could be considered > jumping several guns. :) Sure, I was just suggesting that test could test for the existance of the module and skip otherwise Graham.
Re: [PATCH lib/Net/Config.pm, MANIFEST, t/lib/Mock/Socket.pm, lib/Net/Config.t] Add Tests for Net::Config
On Mon, Oct 22, 2001 at 04:27:51PM -0400, Michael G Schwern wrote: > On Mon, Oct 22, 2001 at 02:08:05PM -0600, chromatic wrote: > > > > So if a test depends on a module in the core it should check that > > > > the module is avaliable, so that the test is skipped with older > > > > perl releases. > > > But this is a little funny. How are these new tests going to wind up > > > on old perl and libnet versions? > > > > I understood that as Graham being unsure about using Test::More in the tests. > > Oh, we can fix that. Just distribute Test::More with libnet, a la > CGI.pm. You can forget that idea. Graham.
Re: [PATCH lib/Net/Config.pm, MANIFEST, t/lib/Mock/Socket.pm, lib/Net/Config.t] Add Tests for Net::Config
On Mon, Oct 22, 2001 at 04:10:06PM -0400, Michael G Schwern wrote: > On Mon, Oct 22, 2001 at 01:44:32PM +0100, Graham Barr wrote: > > Any patches to modules from libnet, and test additions, should be > > against the latest libnet on CPAN, I do not want the core to diverge. > > I can understand this. We should be patching the CPAN libnet. > > > > So if a test depends on a module in the core it should check that > > the module is avaliable, so that the test is skipped with older > > perl releases. > > But this is a little funny. How are these new tests going to wind up > on old perl and libnet versions? Because the new tests should be added to libnet, not the core. And libnet runs on older versions Graham.
Re: [PATCH lib/Net/Config.pm, MANIFEST, t/lib/Mock/Socket.pm, lib/Net/Config.t] Add Tests for Net::Config
On Mon, Oct 22, 2001 at 02:08:05PM -0600, chromatic wrote: > On Monday 22 October 2001 14:10, Michael G Schwern wrote: > > > I can understand this. We should be patching the CPAN libnet. > > In progress. > > > > So if a test depends on a module in the core it should check that > > > the module is avaliable, so that the test is skipped with older > > > perl releases. > > But this is a little funny. How are these new tests going to wind up > > on old perl and libnet versions? > > I understood that as Graham being unsure about using Test::More in the tests. Actually I was refering to Mock::Socket Graham.
Re: Maintaining Archive::Tar and Archive::Zip
On Sat, Mar 02, 2002 at 01:55:29PM +0100, Tels wrote: > -BEGIN PGP SIGNED MESSAGE- > > Moin, > > I Cc:ed [EMAIL PROTECTED], they are the "ones" ;) to decide this, if the > authors are not responding. > > Although I wouldn't count on beeing lucky, since I am trying to > "patch/takeover/maintain" Math::Fraction for almost two years. The authors > address is dead, and multiply requests/efforts all resulting in "lets wait > a few months mores" ;) If it has really been that long then I would agree that we change it. > On 02-Mar-02 Adrian Phillips tried to scribble about: > > > > On the Amavis mailing list (www.amavis.org) it has been mentioned > > several times that Archive::Tar and Archive::Zip are unmaintained, the > > current amavis author has tried to send patches for both packages in > > the past few months without any success; apparently there was supposed > > to be a new version of Archive::Zip released a logn while ago. While Archive::Tar is registered to Calle Dybedahl who uploaded v0.02 back in 1997 Stephen Zander has uploaded a 0.22 release (although that was back on 2000) Have you spoken with Stephen ? Graham. > > > > Now, I would just like to say that I am not criticising the current > > maintainers/authors if they have been unable to find the time to > > release newer versions. I am well aware of the amount of effort > > required to keep packages going especially with other projects and > > real life. > > > > What I would like to ask is :- > > > > - what is the current maintainership state of these 2 modules ? > > > > - if the current maintainers still have big problems would they allow > > the packages to be taken over by someone else ? > > > > - I am willing to do so if they wish, although I do not have any > > existing CPAN modules and will have to go through registering with > > PAUSE (as well as reading the PAUSE docs). > > > > Sincerely, > > > > Adrian Phillips > > - -- > perl -MDev::Bollocks -e'print Dev::Bollocks->rand(),"\n"' > quickly promote industry-wide models > > http://bloodgate.com/perl My current Perl projects > PGP key available on http://bloodgate.com/tels.asc or via email > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.0.6 (GNU/Linux) > > iQEVAwUBPIDI5XcLPEOTuEwVAQEu3gf9FApIjGN32QRFKX6ER7s0QGEJm/d2q7Bc > 72WrMqxKpT6zxcqKGvnz93LrBIzX6L8xU3jYVqDSI+RQUh/iiiFEs4LwdF7GVnt+ > P8WX1iyCEnpAjB4qaRPOHSJ7eJe1+MYHzEtxU/6qjQrFRaLkR6ZBW/N6gJlvApak > a0KSajBd5jBb3tvjnOOQ37nMqLG0g4+2ygQ00ERWIHSgR7ABWJDs+4M9xeImMjuT > 0sLMtd6suMX2D/jUqcxN7RA9NoSfgWhXlBwNnjvsWhI50eAf8h/qu/O8rA7tC+9M > 7LtAjGezfkemalgC69mSgS4kmcnkr7O7MgES5ogE4W2ef3TorGMFbg== > =YwiM > -END PGP SIGNATURE- >
Re: O_ACCMODE
On Tue, Apr 02, 2002 at 03:26:36AM -0500, Mark-Jason Dominus wrote: > > > You probably already found out, but > > > > HP-UX 10.20 Has it defined as 003 > > HP-UX 11.00 Has it defined as 003 > > AIX 4.3.3.0 Has it defined as 3 > > AIX 4.2.1.0 Has it defined as 3 > > Thanks for the information. It turns out some Win32 systems don't > have it at all, so I have to avoid it. > > Instead, I'm doing: > > use Fcntl 'O_RDONLY', 'O_RDWR', 'O_WRONLY'; > sub O_ACCMODE () { O_RDONLY | O_WRONLY | O_RDWR } > > which I think should work everywhere that defines O_((RD|WR)ONLY|RDWR), > whatever their values. Maybe Fcntl should be patched to provide that if O_ACCMODE is not defined Graham.