Re: Is there a need for Data::Find::XPath?

2010-12-01 Thread Andy Armstrong
On 1 Dec 2010, at 12:31, Paul Bennett wrote:
 On the other hand, the docs for Data::Find read like something rather close 
 to what I'd need.
 
 Would there be community interest in a module that was API-identical to 
 Data::Find, except that it took XPath-like expressions instead of (or as well 
 as, in some way, maybe?) the search criteria that that module takes?
 
 Just struck me, while typing this out: Would I rather be better off trying to 
 add support for XPath-like expressions to Data::Find and submitting a patch? 
 Maybe some kind of Data::Find::Criteria:: namespace, objects of subclasses of 
 which (such as Data::Find::Criteria::XPath, 
 Data::Find::Criteria::Disgronifier, or whatever) could be fed as the search 
 criteria to Data::Find? There'd need to be some cleverness in the API of 
 those subclasses, but I reckon it's non-magical cleverness.


It occurred to me when I was writing Data::Find that xpath would be useful - so 
yes, absolutely - patches welcome, thanks :)

It's on github: git://github.com/AndyA/Data--Find.git

The easiest thing (for me :) is if you clone it on github and then issue a pull 
request when you're done.

-- 
Andy Armstrong, Hexten





Re: to upload or not to upload...

2010-11-11 Thread Andy Armstrong
On 10 Nov 2010, at 12:58, Evgeniy Kosov wrote:
 Hi list,
 
 There's one module of mine that I though I could upload on CPAN. But I've 
 still got some open questions about its usefulness and the like.
 
 So, few words about what it is and why it is so.
 My task was to track ranges of available IP addresses (IPv6 as well as IPv4), 
 to print reports (which addresses are free, which aren't), to be able to grab 
 one free IP and so on. I couldn't find any suitable module (btw, is there 
 any?), so I decided to implement one.

Does the (probably misnamed - hah) Net::CIDR::Set intersect much with your 
module?

http://search.cpan.org/dist/Net-CIDR-Set/

-- 
Andy Armstrong, Hexten





Re: Trimming the CPAN - Automatic Purging

2010-03-27 Thread Andy Armstrong
On 26 Mar 2010, at 23:32, Arthur Corliss wrote:
 But it's the weakest and simplest link to replace.


Quite a bit of the discussion here on this topic has revolved around an 
explanation of why that isn't the case. Setting up rsync is trivial for mirror 
operators. Any alternative would likely be less so.

-- 
Andy Armstrong, Hexten





Re: Trimming the CPAN - Automatic Purging

2010-03-27 Thread Andy Armstrong
On 27 Mar 2010, at 00:59, Elaine Ashton wrote:
 The only snag I can forsee in trimming back on the abundance of modules is 
 the case where some modules have version requirements for other modules where 
 it will barf with a mismatch/newer version of the required module (I bumped 
 into this recently but can't remember exactly which module it was) but I 
 think it's rare and the practise should be discouraged.


Maybe that could be solved by having the clients (and maybe search.cpan.org) 
automagically fall back to a backpan mirror?

And, yes, if it's considered a good idea I /am/ prepared to do something about 
it.

-- 
Andy Armstrong, Hexten





Re: Trimming the CPAN - Automatic Purging

2010-03-25 Thread Andy Armstrong
On 25 Mar 2010, at 15:36, Chris Nandor wrote:
 I like that solution better


[snip]

But solution to what? Are we convinced there's actually a problem here?

-- 
Andy Armstrong, Hexten





Re: avoid running CPAN as root

2010-01-12 Thread Andy Armstrong
On 12 Jan 2010, at 16:59, dhu...@hudes.org wrote:
 While the idea of using sudo only at install time is nice, there are two
 problems:
 1. Some modules require extra privileges at test time

Do they? I've got 1213 distributions installed on this laptop. All using cpan 
and none of them required elevated privileges during testing. Which modules do 
this?

 2. Far more impact is that sudo requires that you enter your password each
 time you invoke it.  Therefore you will have to enter your password once
 for each module you install. On any given module you may have 3 or 4
 prerequisites; if you update your modules to current once a quarter, you
 will have dozens to install.  Given the way that CPAN.pm operates you
 can't just keep going and add each blib to your @INC and only do one sudo
 session to run all the individual make installs.


Often sudo will be configured with a 15 minute grace period which means you 
only need to authenticate for the first make install / ./Build install.

-- 
Andy Armstrong, Hexten





Re: avoid running CPAN as root

2010-01-12 Thread Andy Armstrong
On 12 Jan 2010, at 17:23, Dana Hudes wrote:
 Rebuilding a few hundred modules will take more than 15 minutes, especially 
 if you have to download each one. I suppose you could modify sudoes to make 
 it 8 hours. 


The timeout is reset each time sudo is used - so a shorter timeout is usually 
OK.

-- 
Andy Armstrong, Hexten





Re: Puzzling error from cpan testers

2009-05-03 Thread Andy Armstrong

On 3 May 2009, at 20:07, Bill Ward wrote:
For my module Number::Format I am getting a strange result from cpan  
testers that I can't replicate.  See this error report...

http://www.nntp.perl.org/group/perl.cpan.testers/2009/03/msg3560533.html

#   Failed test 'pi with precision=6'
#   at t/round.t line 18.
#  got: 3.141593
# expected: 3.141593

#   Failed test 'precision=-2'
#   at t/round.t line 24.
#  got: 123500

# expected: 123500
# Looks like you failed 2 tests of 16.
t/round.t 
Here are the test cases in question:

cmp_ok(round(PI,6), '==', 3.141593, 'pi with  
precision=6');


cmp_ok(round(123456.78951, -2), '==', 123500,   'precision=-2' );

Since it's using '==' it shouldn't be possible to get those errors,  
right?  Anyone have any thoughts?



Yeah, that's floating point. There can be a difference between the two  
values that's too small to display but big enough to make them non- 
equal. '==' is /always/ risky with FP values.


You should instead check for the value being within an acceptable range.

--
Andy Armstrong, Hexten



Re: New Module

2009-04-29 Thread Andy Armstrong

On 29 Apr 2009, at 11:59, Ivan Wills wrote:
I have most converted a script that I have long used for managing  
templates (for files like perl files, XHTML etc) into a package that  
I can upload to CPAN. It includes a script to actually pass the  
templates.


At the moment it is called Template::CMD. I was wondering if this is  
the correct/best name for it?



I think the Template namespace pretty much belongs to Template Toolkit.

Can you expand on what 'managing templates' amounts to?

--
Andy Armstrong, Hexten



Re: Net::Vimeo::API - namespace question

2009-03-10 Thread Andy Armstrong

On 10 Mar 2009, at 14:23, David Golden wrote:
On Tue, Mar 10, 2009 at 10:05 AM, Jonathan Yu  
jonathan.i...@gmail.com wrote:

WWW::Vimeo.


That would be my choice.  Adding API seems redundant.



Agreed. That's in line with the de-facto standard.

--
Andy Armstrong, Hexten



Re: Automated testing

2008-12-01 Thread Andy Armstrong

On 29 Nov 2008, at 00:18, Bill Moseley wrote:

Is there something that's designed for this job that I'm missing?



You may want to investigate Smolder for gathering the test results.  
And parrot uses buildbot for continuous integration.


There's also a scrappy script that Test::Harness uses - you can find  
it here:


https://svn.hexten.net/tapx/trunk/smoke/

smoke.pl is a cron job - and there are some sample config files in  
there too.


--
Andy Armstrong, Hexten





Re: Testing on blead

2008-07-28 Thread Andy Armstrong

On 28 Jul 2008, at 15:28, Ken Williams wrote:
On Mon, Jul 28, 2008 at 8:11 AM, Johan Vromans  
[EMAIL PROTECTED] wrote:
What are your ideas about this? Should blead test results be  
separated

from the other results?


Wholeheartedly, yes.  It's useful to get the reports on blead, but
probably not so useful for people who just want to cruise through
reports to see whether the module will work for them - they may not
even usually be aware that they're looking at a blead test.



I'd expect that the main audience for tests run against blead are Perl  
5 core developers and the developers of the module itself. There seems  
to me to be little need to pollute the public test results with blead  
tests at all.


--
Andy Armstrong, Hexten





Re: Proposal: Test::Refcount

2008-07-14 Thread Andy Armstrong

On 14 Jul 2008, at 18:12, Paul LeoNerd Evans wrote:
No amount of cycle checking in $some_object is going to find this  
cycle.
If the cycled object is one like this; containing the only reference  
to

itself, then almost by definition there's nothing that could be walked
for memory cycles.



I've used Devel::Leak::Object[1] successfully in that kind of  
situation. It counts the number of blesses and destroys. It works well  
for the 'object makes a closure that references itself' scenario.


[1] http://search.cpan.org/dist/Devel-Leak-Object/

--
Andy Armstrong, Hexten





Re: Must exist, right?

2008-06-19 Thread Andy Armstrong

On 19 Jun 2008, at 03:18, Chris Dolan wrote:
Implemented!  See the attached .pm file and the test.pl file that  
verifies the four snipped use cases.  It could certainly be made  
more readable, but my interest is waning quickly.  :-)  I hereby  
grant anyone permission to use/extend this crappy code under the  
same license terms as Perl itself.



Heh. I can see this going all FizzBuzz :)

--
Andy Armstrong, Hexten






Must exist, right?

2008-06-18 Thread Andy Armstrong

I assume there's a module that works like this?

package MyFoo;

use Data::Auto::Objectify::Thing qw( my_data_field );

sub new {
bless {
my_data_field = {
foo = [ 1, 2, 3 ],
bar = { eat = 'drink', sleep = 'wake' },
}
  },
  shift;
}

package main;

my $my_foo = MyFoo-new;

my $two = $my_foo-foo( 1 );
my $eat = $my_foo-bar-eat;

In other words I want it to synthesise accessors based on the contents  
of a complex data structure. For bonus points it might also allow


# Can use subscript notation for hashes
my $eat = $my_foo-bar('eat');

And maybe allow multiple subscripts so that, for example, if I had a  
field called 'grid' that contained a rectangular array I could then do


my $point = $my_bar-grid(3, 5);

It's got to exist, right? I had a look but there are so many  
^(?:Object|Data)::.* modules that it's a bit hard to see the wood for  
the trees :)


--
Andy Armstrong, Hexten



Re: Must exist, right?

2008-06-18 Thread Andy Armstrong

On 19 Jun 2008, at 00:35, Andy Armstrong wrote:
It's got to exist, right? I had a look but there are so many  
^(?:Object|Data)::.* modules that it's a bit hard to see the wood  
for the trees :)



Ah. I see:

 http://search.cpan.org/dist/Class-AutoAccess/

But that creates accessor/mutators. I want to generate read only  
accessors and have any arguments to them interpreted as a path into  
the data structure below the point referred to by the accessor.


--
Andy Armstrong, Hexten






Re: Must exist, right?

2008-06-18 Thread Andy Armstrong

On 19 Jun 2008, at 01:14, Eric Wilhelm wrote:

You want something like Object::Accessor, but without needing to
actually create the object?


Yup. I want a read-only object with dynamically generated per object  
methods that reflect the internal data structure.


Assuming you could be bothered to call new() for the sub-object  
(passing

it to the contructor, etc), just about anything including Moose would
work ;-)  I'll let the more Moose-enabled folks comment on how
a 'default' sub (or some other setup) would do exactly what you want.



I really /must/ look at Moose properly soon :)

--
Andy Armstrong, Hexten






Re: Must exist, right?

2008-06-18 Thread Andy Armstrong

On 19 Jun 2008, at 01:18, David Nicol wrote:

Considering that Data::Dumper is entirely regular in how it will
present a deconstruction of the data structure, and you have a clear
concept of how you wish the example structure === accessor set thing
to work, it's certainly possible, and would take maybe two hacking
sessions to get right (provided you don't get swept into the lake by a
mini-tsunami.)


Yeah, I've been sort of passively thinking about how to do it for a  
little while. I don't think it's too hard but I don't want to reinvent  
the wheel.



It seems like something that might not exist already, as the need to
share that kind of meta-abstraction is felt by only extreme show-offs
(such as various people on this list)


:)

To make your example DWITYM, Data::Auto::Objectify::Thing would  
presume that

the structure returned by its caller has a Cnew that will return a
fully populated example object when called with no arguments, and
would postpone defining the accessors until the INIT phase, because
the {caller()::'new'} does not exist yet at Cimport time.


I was thinking the accessors would be completely dynamic - AUTOLOADed.  
So creation of the data structure can happen at any time before you  
start calling accessors.



I would have Data::Auto::Objectify::Thing take an optional C example
= ...  import arg in addition to the wait-until-INIT trick, and
would bless the substructures into constructed-named packages under
Data::Auto::Objectify::Thing::Packages::... for example.


I wasn't thinking of making dynamic packages at all. See above.


Tipjar::fields creates accessors for named fields by imposing array
object semantics on its calling package; recently I prefer to use
:lvalue subroutines for accessors rather than defining both get* and
put* s.

In your example, you are planning on subclassing MyFoo into a whole
family of kinds of hash-based objects that share this accessor set, or
something.  It's not clear if the elements are supposed to be
extensible or not.  If they aren't extensible, and there is a fixed
set of them, using an array-based object and naming all the slots with
lvalue accessors is the way I would do it



I basically want to be able to create read only 'value' objects that  
wrap a data structure that's created dynamically at runtime. A  
concrete example: I've just written some code that parses a formatted  
summary of memory usage for a server product. There are five named  
metrics for each of around 30 named categories of memory usage. My  
code just parses what it finds - it doesn't know any of the names  
ahead of time and the names might change as the product evolves.


I'd like the object that falls out of the end to let me do e.g.:

 print $mem-relay_buffer-allocations;

instead of

 print $mem-get('relay_buffer', 'allocations');

which is how it looks at the moment.

--
Andy Armstrong, Hexten






Re: Is there even a C compiler?

2008-02-25 Thread Andy Armstrong

On 25 Feb 2008, at 16:25, Nicholas Clark wrote:

On Mon, Feb 25, 2008 at 03:59:14PM +, Andy Armstrong wrote:

Is there a generally approved way for an XS module to test for the
existence of a C compiler before attempting to build?


Personally I'd like such a test to be standard in MakeMaker, because  
I am

of the (old fashioned) opinion that if %Config says that there is a C
compiler and there isn't one, then it's lying (and the instalation  
is broken,

for a small value of broken)


+1 for that. But it doesn't solve my immediate problem :)


Oh, and I don't want wheels re-invented.


I guess I could just try running whatever $Config{cc} suggests. Are
there any edge cases that that misses? Does $(CC) -o foo.o foo.c work
just about everywhere?


Not sure. Certainly don't test that there is a file of that name in  
$PATH,

as it's acceptable for it to be a series of shell commands.


Yup, I figured that.


Also, you're already making assumptions about object file extension.
You can get that from $Config:

$ perl -V:obj_ext
obj_ext='.o';



Ah yes. Thanks :)

--
Andy Armstrong, Hexten






Re: Is there even a C compiler?

2008-02-25 Thread Andy Armstrong

On 25 Feb 2008, at 16:35, David Golden wrote:

Look at Devel::Checklib.  If you don't select any libraries, I believe
it still checks for a compiler.


Oh, so it does. I looked at it, quickly scanned assert_lib and  
concluded that it wouldn't work - but now I see that _findcc can die.


Cool, thanks :)

--
Andy Armstrong, Hexten






Re: Is there even a C compiler?

2008-02-25 Thread Andy Armstrong

On 25 Feb 2008, at 18:30, Guy Hulbert wrote:

On Mon, 2008-02-25 at 13:22 -0500, Guy Hulbert wrote:

something as
horrible as:
   -x `which $Config{cc}`


plus:
`which $Config{cc} --version` =~ m/$Config{gccversion}/

seems to work for all the combinations below ... but I can imagine
that there are situations where it might not.



See also Windows, VMS, any other machine that doesn't have which.

--
Andy Armstrong, Hexten






Re: Is there even a C compiler?

2008-02-25 Thread Andy Armstrong

On 25 Feb 2008, at 18:42, Guy Hulbert wrote:

You still need to figure out whether to check 'ccversion' or
'gccversion' to when $Config{cc} can be either 'cc' or 'gcc' and also
how to find the '--version' string on windows ... but it looks doable.



I'm using Devel::CheckLib and relying on David Cantrell to make it all  
work. If there's a problem in his compiler detection logic it's more  
likely to get fixed quickly than it is if I roll some ad-hoc code of  
my own. It's also more likely to get detected before it impacts  
directly on my module.


--
Andy Armstrong, Hexten






Re: Assistance with IPC modules and perl 5.10

2008-02-18 Thread Andy Armstrong

Hi Maurice,

Tom (CCd) is attempting to get IPC::ShareLite working on 64 bit Fedora  
Core so it can be released as an FC package. He's filed a bug report  
(see below) but he's anxious to move things forward as quickly as  
possible because he has dependencies on IPC::ShareLite that need to be  
satisfied.


I've offered to help if I can so if you don't have time to look at it  
I could (assuming I can fix the problem) provide a patch.


Either way please let us know.

Thanks :)

On 18 Feb 2008, at 21:04, Tom spot Callaway wrote:



On Mon, 2008-02-18 at 20:49 +, Andy Armstrong wrote:


So let's get the ball rolling. If nobody else is available to fix the
problems I'll happily take a look. What attempts have you made to
contact the authors?


I've filed a bug at CPAN for IPC::ShareLite, because I think that when
it is working, that IPC::SharedCache will work properly.

http://rt.cpan.org/Public/Bug/Display.html?id=33067

I certainly appreciate the help here. :)

~spot



--
Andy Armstrong, Hexten






Re: Tk / Nick Ing-Simmons

2007-11-22 Thread Andy Armstrong

On 22 Nov 2007, at 18:24, Nicholas Clark wrote:

On Thu, Nov 22, 2007 at 04:54:31PM +, Andy Armstrong wrote:

I notice that since Nick Img-Simmons' sad passing Tk seems
unmaintained. It certainly doesn't build on 5.10. I wonder if anyone
knows the status of it and whether anyone is considering  
maintaining it?



Thoughts?


I think you're missing what Slaven has been up to:

http://search.cpan.org/~srezic/Tk-804.027_501/



Ah yes. Thanks. I'll mail him and find out what he's up to with it.

--
Andy Armstrong, Hexten






Re: Tk / Nick Ing-Simmons

2007-11-22 Thread Andy Armstrong

On 22 Nov 2007, at 18:19, Andy Lester wrote:
I notice that since Nick Img-Simmons' sad passing Tk seems  
unmaintained. It certainly doesn't build on 5.10. I wonder if  
anyone knows the status of it and whether anyone is considering  
maintaining it?


I think that it's important to Nick's memory that his code is not  
allowed to rot. Unless anyone thinks it's in poor taste I'd like to  
take a crack at making the necessary changes so it keeps working.


I meant to send out an announcement about that way back when, like  
when I took over Iain Truskett and Simon Cozens' modules, but never  
got around to it.  I think it would be tremendous to get Tk up and  
running again.  Heck, I might even help.



If there are no objections let's move ahead with that then. Could  
someone give ANDYA and PETDANCE co-maint please?


--
Andy Armstrong, Hexten






Tk / Nick Ing-Simmons

2007-11-22 Thread Andy Armstrong
I notice that since Nick Img-Simmons' sad passing Tk seems  
unmaintained. It certainly doesn't build on 5.10. I wonder if anyone  
knows the status of it and whether anyone is considering maintaining it?


I think that it's important to Nick's memory that his code is not  
allowed to rot. Unless anyone thinks it's in poor taste I'd like to  
take a crack at making the necessary changes so it keeps working.


Thoughts?

--
Andy Armstrong, Hexten






Re: New fields for META.yml

2007-10-29 Thread Andy Armstrong

On 29 Oct 2007, at 22:25, A. Pagaltzis wrote:

YAGNI does not apply either: this *is already* the overnext time.
The gravatar spat would’ve been solved by something like that



I missed that... Got a link?

--
Andy Armstrong, Hexten






Re: New fields for META.yml

2007-10-29 Thread Andy Armstrong

On 29 Oct 2007, at 23:33, Andy Armstrong wrote:

I missed that... Got a link?



Have now - thanks.

--
Andy Armstrong, Hexten






Re: RFC: String::Smart

2007-10-14 Thread Andy Armstrong

On 13 Oct 2007, at 22:52, Bill Ward wrote:

CGI.pm has code to do URI and HTML escaping.
DBI/DBD modules take care of SQL escaping.
Any other type of escaping is probably already taken care of by some
other module for that application.

Now, if your module just acts as a sort of clearing house for those
other escape methods, then that might be OK.  But I'm very leery of
the idea that you may be copying the code from those modules (or
writing equivalent code).


It's a clearing house. It makes no assumptions about which  
transformations you'll want to apply.


--
Andy Armstrong, Hexten





Re: RFC: String::Smart

2007-10-13 Thread Andy Armstrong

On 13 Oct 2007, at 21:21, josh wrote:

You see the string at compile-time. If you wish to extend the effect
into runtime then your result is an object which further propagates
the effect until stringify is called.

Regexp::NamedCaptures uses both of these techniques.


Mmmm. That's fun, thanks.

--
Andy Armstrong, Hexten





Re: lambda - a shortcut for sub {...}

2007-10-12 Thread Andy Armstrong

On 12 Oct 2007, at 15:04, Andy Lester wrote:

What worries me is someone's gonna submit an otherwise useful module
to CPAN that uses this feature.


Oh no, THEN what?  What's the tragedy there?


You're just being meta-negative Andy :)

--
Andy Armstrong, Hexten





Re: RFC: String::Smart

2007-10-11 Thread Andy Armstrong

On 11 Oct 2007, at 11:46, A. Pagaltzis wrote:

* Andy Armstrong [EMAIL PROTECTED] [2007-10-10 22:45]:

Nice email address. :-P


It had to be done :)


This evening I started playing with String::Smart (the name is
as provisional as everything else).


Something with “language”, “type”, “quoting” or “escaping” would
be more appropriate I think.


Yup, OK.


In general a String::Smart string knows which transformations
are currently applied to a string and when you ask for a
particular representation of that string it computes the path
from the current encoding to the desired encoding and applies
the transformations in the appropriate order.


Have you seen Tom Moertel’s article on applying Haskell to this?
http://blog.moertel.com/articles/2006/10/18/a-type-based-solution- 
to-the-strings-problem


Oh that's nice! Thanks for that.


See also String::EscapeCage, which was discussed recently on this
list, and which is just as horribly named. :-)  It differs in
that it doesn’t address the chaining you mention, and by hooking
itself into tainting.


Yeah - it has slightly different aims as far as I can tell.


And I’m almost positive that I have seen one more module that
tries to address the exact same issue.


I assumed there must be one but couldn't find it. Anyone?

--
Andy Armstrong, Hexten





RFC: String::Smart

2007-10-11 Thread Andy Armstrong
Here's something I've been mulling for probably about eight years  
without doing anything about it.


Particularly in web applications - but in other areas too - people  
regularly make a complete mess of escaping / unescaping strings. At  
different times a string may need to be


* unescaped plain text
* SQL quoted
* entity encoded
* url encoded
* json encoded
* etc

It may even need to be encoded using some combination of those  
encodings - in which case the order in which they are applied to the  
string matters.


The continued popularity of XSS exploits, SQL injection bugs etc  
confirms that people still aren't getting it right. So it must be hard.


This evening I started playing with String::Smart (the name is as  
provisional as everything else). It lets you do


my $email = 'Andy Armstrong [EMAIL PROTECTED]';

my $enc = as html = $email;
print $enc\n;
# Prints Andy Armstrong lt;[EMAIL PROTECTED]gt

Multiple encodings may be applied:

# Apply HTML entity encoding and then query encoding
# Currently multiple encodings are separated by '_'
my $for_query = as html_query = $email;

You can also assert that a string is already escaped in some way -  
although I don't have a clean syntax for that. So you could say


my $this = is_already html = 'pA paragraph/p';
my $that = 'Just a string';

my $html_this = as html $this;
my $html_that = as html $that;

which would give you

$html_this = 'pA paragraph/p'; # No transformation - was already  
HTML

$html_that = 'lt;Just as stringgt;'; # Applied entity encoding

In general a String::Smart string knows which transformations are  
currently applied to a string and when you ask for a particular  
representation of that string it computes the path from the current  
encoding to the desired encoding and applies the transformations in  
the appropriate order.


So when you're generating a SQL query or a chunk of HTML you can just  
ask for the 'as sql' or 'as html' version of each string you use  
without worrying about how it's currently encoded.


Currently strings with a non-empty set of encodings turn into a  
blessed hashref that overloads stringification. I can't think of any  
other sensible way to associate the 'how is this currently encoded'  
metadata with a string. I'm open to suggestions.


What do people think? Useful?

http://imgs.xkcd.com/comics/exploits_of_a_mom.png

--
Andy Armstrong, Hexten





Re: CPAN security

2007-10-11 Thread Andy Armstrong

On 11 Oct 2007, at 18:23, Bill Moseley wrote:

In general, I prefer to run make and make test as a normal user and
then sudo make install, but sudo cpan sure is easy.  But, that's
hardly a complete test of code.


Grab the latest CPAN, set these two options:

   make_install_make_command [sudo make]
   mbuild_install_build_command [sudo ./Build]

Then chown your ~/.cpan to yourself (because if you've been doing  
sudo cpan some of the files will be owned by root)


$ sudo chown -R me:me ~/.cpan

and stop running CPAN as root. It'll then do make, make test, sudo  
make install or the ./Build equivalents.


That doesn't stop make install doing something hoopy as root of course.

--
Andy Armstrong, Hexten





RFC: String::Smart

2007-10-10 Thread Andy Armstrong
Here's something I've been mulling for probably about eight years  
without doing anything about it.


Particularly in web applications - but in other areas too - people  
regularly make a complete mess of escaping / unescaping strings. At  
different times a string may need to be


* unescaped plain text
* SQL quoted
* entity encoded
* url encoded
* json encoded
* etc

It may even need to be encoded using some combination of those  
encodings - in which case the order in which they are applied to the  
string matters.


The continued popularity of XSS exploits, SQL injection bugs etc  
confirms that people still aren't getting it right. So it must be hard.


This evening I started playing with String::Smart (the name is as  
provisional as everything else). It lets you do


my $email = 'Andy Armstrong [EMAIL PROTECTED]';

my $enc = as html = $email;
print $enc\n;
# Prints Andy Armstrong lt;[EMAIL PROTECTED]gt

Multiple encodings may be applied:

# Apply HTML entity encoding and then query encoding
# Currently multiple encodings are separated by '_'
my $for_query = as html_query = $email;

You can also assert that a string is already escaped in some way -  
although I don't have a clean syntax for that. So you could say


my $this = is_already html = 'pA paragraph/p';
my $that = 'Just a string';

my $html_this = as html $this;
my $html_that = as html $that;

which would give you

$html_this = 'pA paragraph/p'; # No transformation - was already  
HTML

$html_that = 'lt;Just as stringgt;'; # Applied entity encoding

In general a String::Smart string knows which transformations are  
currently applied to a string and when you ask for a particular  
representation of that string it computes the path from the current  
encoding to the desired encoding and applies the transformations in  
the appropriate order.


So when you're generating a SQL query or a chunk of HTML you can just  
ask for the 'as sql' or 'as html' version of each string you use  
without worrying about how it's currently encoded.


Currently strings with a non-empty set of encodings turn into a  
blessed hashref that overloads stringification. I can't think of any  
other sensible way to associate the 'how is this currently encoded'  
metadata with a string. I'm open to suggestions.


What do people think? Useful?

http://imgs.xkcd.com/comics/exploits_of_a_mom.png

--
Andy Armstrong, Hexten



Re: RFC: relative.pm

2007-10-09 Thread Andy Armstrong

On 9 Oct 2007, at 11:05, Jonathan Rockway wrote:

What a fucking joke.


If it's a joke you should use Comic Sans so everyone /knows/ it's funny.

--
Andy Armstrong, Hexten





Re: relative.pm

2007-10-07 Thread Andy Armstrong

On 7 Oct 2007, at 15:33, Peter Pentchev wrote:

A source filter, perhaps?


Run away! :)

--
Andy Armstrong, Hexten





Re: RFC: relative.pm

2007-10-07 Thread Andy Armstrong

On 7 Oct 2007, at 21:48, Jim Schneider wrote:

   use relative to = self, qw(foo bar roo);

Anything else would be used the way it is currently defined.  I  
like relative to = 'self', because it seems a bit more regular,  
and somewhat self documenting.


I think that's the default. You only use 'to' (or -to now :) to  
resolve names relative to some other namespace.


This module allows you to load modules using only parts of their  
name, relatively to the current module or to a given module. Module  
names are by default searched below the current module, but can be  
searched upper in the hierarchy using the ..:: syntax.


From:
  http://search.cpan.org/~saper/relative-0.02/lib/relative.pm

--
Andy Armstrong, Hexten





Re: RFC: relative.pm

2007-10-06 Thread Andy Armstrong

On 6 Oct 2007, at 11:17, Sébastien Aperghis-Tramoni wrote:

I like the idea. Catalyst privately invents something like that,
so obviously there are other people who feel the same need.


Yes, POE also provide a similar mechanism, that's why I was  
thinking to provide a generic module to do that.



But I like neither the name nor the interface. How about this:

package BigApp::Report;
use subclass qw(..::Utils Create Publish);
# loads BigApp::Utils, BigApp::Report::Create,  
BigApp::Report::Publish


subclass would imply more OO semantic than I'd like, as the  
module just loads others modules, but I agree it's a better name  
than relative and I can't find a better one.
Also agreeing for the API change. I know I was pondering about  
using .. but can't remember why I didn't.


Would it also do

use relative [to = 'My::Big::Namespace'] = qw( This That  
Munger::Fast Munger::Precise );


?

--
Andy Armstrong, Hexten





Re: RFC: relative.pm

2007-10-06 Thread Andy Armstrong

On 6 Oct 2007, at 11:46, Sébastien Aperghis-Tramoni wrote:

Would it also do

use relative [to = 'My::Big::Namespace'] = qw( This That  
Munger::Fast Munger::Precise );


It can easily do that. The problem is more the name. In this case,  
use relative to ... works well. But in y original example, use  
subclass works better. Maybe I should provide both modules then.


I always hesitate to suggest Aristotle is mistaken - it's not a  
common occurrence - but I really think 'subclass' is wrong. As you  
said this is an extension to the semantics of use that has (I  
presume) nothing to do with any inheritance relationship the modules  
may have with each other.


I quite like 'relative' to be honest. And I like the idea of the  
module. I'll use it immediately when you release it, thanks.


--
Andy Armstrong, Hexten





Re: Devel::TraceLoad

2007-08-05 Thread Andy Armstrong

On 31 Jul 2007, at 13:10, Andy Armstrong wrote:
I wonder if you're still interested in maintaining  
Devel::TraceLoad. I notice that the last release was over six years  
ago and that it currently has test failures. If you are no longer  
interested in maintaining it would you be prepared to allow me to  
become co-maintainer?


I haven't heard back from Phillipe. I asked Joshua Pritkin (co- 
maintainer) if he knew what the status of Devel::TraceLoad was. His  
opinion was that it'd be fine for me to take it over.


I have a new version just about ready to go. Does anyone object if I  
take it over - and if not could someone give the permissions a kick  
please?


--
Andy Armstrong, hexten.net



Devel::TraceLoad

2007-07-31 Thread Andy Armstrong

Hello Phillipe,

I wonder if you're still interested in maintaining Devel::TraceLoad.  
I notice that the last release was over six years ago and that it  
currently has test failures. If you are no longer interested in  
maintaining it would you be prepared to allow me to become co- 
maintainer?


Thanks.

--
Andy Armstrong, hexten.net



Re: WordPress module?

2007-06-25 Thread Andy Armstrong

On 21 Jun 2007, at 19:54, Bill Ward wrote:

Does anyone know of a Perl module that talks to a WordPress database?
I'm thinking of writing one but prefer to avoid wheel reinvention.


I imagine it'd be better to talk to Wordpress's XMLRPC interface  
unless you need something that can't be done that way. The DB schema  
is free to change in backwards incomptible ways.


--
Andy Armstrong, hexten.net



Re: US mirror of search.cpan *broken*

2007-05-28 Thread Andy Armstrong

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 28 May 2007, at 00:30, Jonathan Rockway wrote:
The bizrate search.cpan is broken.  The most recent module (judging  
by the

recent tab) is from 5 days ago, 23 May.

I'm told that the UK mirror (digitalcraftsmen) is running fine.


Ah. That explains why I can see

http://search.cpan.org/dist/Captcha-reCAPTCHA

but folks in the US can't.

So yes I can confirm that the digitalcraftsmen mirror is fine.

- --
Andy Armstrong, hexten.net

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFGWrH6woknRJZQnCERAt97AJ9v+g4BUiWgjKHVWrBBzR0K3PNmqgCgm4dw
+eIpUtBgMuTGuUlFeU2ZNRk=
=6JXL
-END PGP SIGNATURE-


Re: anybody feel like translating some PHP to Perl?

2007-05-25 Thread Andy Armstrong

On 25 May 2007, at 18:09, Andy Armstrong wrote:

Have they released source? The site says it's a hosted web service.


Ah. This: http://recaptcha.net/plugins/php/ ?

--
Andy Armstrong, hexten.net



Re: anybody feel like translating some PHP to Perl?

2007-05-25 Thread Andy Armstrong

On 25 May 2007, at 18:04, David Nicol wrote:

http://news.com.com/2100-1029-6186430.html


Have they released source? The site says it's a hosted web service.

--
Andy Armstrong, hexten.net



Re: anybody feel like translating some PHP to Perl?

2007-05-25 Thread Andy Armstrong

On 25 May 2007, at 18:04, David Nicol wrote:

http://news.com.com/2100-1029-6186430.html


Captcha::reCAPTCHA coming up as soon as I write some docs.

Here it is in action:

http://hexten.net/cgi-bin/captch.pl

--
Andy Armstrong, hexten.net



Re: anybody feel like translating some PHP to Perl?

2007-05-25 Thread Andy Armstrong

On 25 May 2007, at 19:53, Andy Armstrong wrote:

Here it is in action:

http://hexten.net/cgi-bin/captch.pl


Now on CPAN:

http://search.cpan.org/dist/Captcha-reCAPTCHA/

--
Andy Armstrong, hexten.net



Re: Modules are missing on CPAN

2007-05-24 Thread Andy Armstrong

On 24 May 2007, at 14:29, Graham Barr wrote:

I do not see WWW-Mechanize-1.26.tar.gz  in

http://www.cpan.org/authors/id/P/PE/PETDANCE/

but it is on backpan at

http://backpan.perl.org/authors/id/P/PE/PETDANCE/

Did you delete it via PAUSE ?


Another data point:

Missing: http://cpan.hexten.net/authors/id/P/PE/PETDANCE/

Present: http://backpan.hexten.net/authors/id/P/PE/PETDANCE/

--
Andy Armstrong, hexten.net



search.cpan.org search oddness

2007-05-22 Thread Andy Armstrong
It's interesting how difficult it is to find CGI.pm using  
search.cpan.org. For example


http://search.cpan.org/search?query=CGImode=all

doesn't seem to mention CGI.pm at all.

Has it always been like that or has something changed recently?

--
Andy Armstrong, hexten.net



Re: search.cpan.org search oddness

2007-05-22 Thread Andy Armstrong

On 22 May 2007, at 20:08, A. Pagaltzis wrote:


* Andy Armstrong [EMAIL PROTECTED] [2007-05-22 20:30]:

It's interesting how difficult it is to find CGI.pm using
search.cpan.org.


Difficult?

http://search.cpan.org/search?query=CGImode=module


Difficult for people who aren't sure how the search interface works,  
certainly.


--
Andy Armstrong, hexten.net



Re: Module Proposal: Number::Collection

2007-05-19 Thread Andy Armstrong

On 19 May 2007, at 13:40, K. J. Cheetham wrote:
Damn, I must have missed Set::IntSpan::Fast somehow when I was  
looking around for a module that did what I wanted.


By the looks of it, your module does almost everything mine does  
and much more. The only thing it seems to be lacking is a handy way  
to turn the output of as_string() back into an object, which is  
something I needed for dealing with user inputted data, and  
potentially a function to validate such a string too. Would you be  
interested in me writing a patch for something like that?


Yes please :)

--
Andy Armstrong, hexten.net



Re: Module Proposal: Number::Collection

2007-05-18 Thread Andy Armstrong

On 18 May 2007, at 16:21, K. J. Cheetham wrote:

I've already written the bulk of the module and a series of tests and
POD for it, which I can show if need be.


How does it intersect with

http://search.cpan.org/dist/Set-IntSpan/

and

http://search.cpan.org/dist/Set-IntSpan-Fast/

?

--
Andy Armstrong, hexten.net



Re: recent search.cpan changes?

2007-05-05 Thread Andy Armstrong

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 5 May 2007, at 09:29, Jonathan Rockway wrote:
Also, I can't seem to find the search.cpan source.  Could someone  
provide a

pointer to it?


I've been wondering if that was available too.

- --
Andy Armstrong, hexten.net

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFGPG8wwoknRJZQnCERAviiAKCEv7f80YDDWVbik7mwNuPHDzkuYQCdH9nU
il22bAI6QyCPQIzaJW+tjkA=
=qcI3
-END PGP SIGNATURE-


Re: Test failures - I can't work out why

2007-05-02 Thread Andy Armstrong

On 2 May 2007, at 11:35, Ovid wrote:

Hmm, let's see.  'grep' from Portland.pm gave up IT to sell fishing
reels.  Jamie Zawicky started a night club and Randal Schwartz has DJd
at them.  Many of us are members of the Perlmonks Monastery.  I guess
we've all lost that abstraction layer ... :)


That's me in the corner.
That's me in the spotlight.
Losing my abstraction layer.

--
Andy Armstrong, hexten.net



Re: Test failures - I can't work out why

2007-05-02 Thread Andy Armstrong

On 2 May 2007, at 23:40, Randal L. Schwartz wrote:

Andy That's me in the corner.
Andy That's me in the spotlight.
Andy Losing my abstraction layer.

s/layer//, it scans better.

Trying to keep my point of view...
And I don't know if I can do it.
Oh no, I code too much.
Haven't debugged enough.

Is that why I heard you laughing?
I thought that I heard you ping.
I think I thought I saw you reply.


Yes, that's much better :)

--
Andy Armstrong, hexten.net



Re: Module Proposal: Parse::Reversible

2007-04-25 Thread Andy Armstrong

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 25 Apr 2007, at 21:18, Paul LeoNerd Evans wrote:

I'm still inviting comment on its behaviour though...


I like it. After

This regexp should not contain any capture brackets ( ) as these  
will confuse the parsing logic.


I'd add Instead use non-capturing brackets (?: ) to group subparts  
of the regexp. just to avoid anyone cargo-culting the notion that  
you can't use brackets at all.


- --
Andy Armstrong, hexten.net

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFGL8f+woknRJZQnCERAthbAKDNGsQwCcIv2H2qOdu75snV3bYreACglG59
H8XIHuSpLnyTiCKZG1lP4kc=
=H1Md
-END PGP SIGNATURE-


Re: Module Proposal: Parse::Reversible

2007-04-24 Thread Andy Armstrong

On 24 Apr 2007, at 18:07, A. Pagaltzis wrote:

So I think somewhere under either Text:: or String:: might be
better.


String::Template?


String::Template::Reversible maybe? String::Template sounds like a  
namespace rather than a module.


--
Andy Armstrong, hexten.net



Re: Module Proposal: Parse::Reversible

2007-04-21 Thread Andy Armstrong

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 21 Apr 2007, at 13:57, Paul LeoNerd Evans wrote:
Hmm.. Decisions... Do I change my code to use URI::Template, or  
release

Parse::Reversible anyway, on the grounds that it does cover a slightly
different area, even if in my case they're both usable.?


I like the generality of Parse::Reversible. I've just done a similar  
thing for Perl::Version to enable it to modify version numbers but  
retain their formatting. I didn't have the sense to generalise it  
though. If you release your module I'd certainly consider modifying  
Perl::Version to use it.


- --
Andy Armstrong, hexten.net

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFGKhxwwoknRJZQnCERAs1MAJ43l/EfS6lbfj4HaZKMZEA1hjnMvACgp2GP
OeUD4jPS24xRvv4YWGmjNYk=
=PO+4
-END PGP SIGNATURE-


Re: Module Proposal: Parse::Reversible

2007-04-20 Thread Andy Armstrong

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 20 Apr 2007, at 18:50, Paul LeoNerd Evans wrote:

I'd appreciate some comments on this; specifically, if this
functionallity would be useful enough to put on CPAN, or if it seems a
quite specialised solution to a specific problem and not worth doing.


I like it. You could extend the syntax to provide for printf()  
formatting:


  '/photos/album${ALBUM:\d+}/photo${PHOTO:\d+}.jpg'

could optionally be

  '/photos/album${ALBUM:\d+:%04d}/photo${PHOTO:\d+:%04d}.jpg'

to get back strings like

  '/photos/album0123/photo0001.jpg'

- --
Andy Armstrong, hexten.net

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFGKP6twoknRJZQnCERApU0AJ0ar/eRTfNvuF6IbcHyTzHlUwC30wCfXkdI
VzK3aCUJPw1e2UeJTBCNrRw=
=bEjv
-END PGP SIGNATURE-


Re: Module proposal: Test::Timer

2007-03-08 Thread Andy Armstrong

On 8 Mar 2007, at 12:53, Paul LeoNerd Evans wrote:
* You've put all the POD at the end of the file. I usually find  
that if

  I put the POD for each function just above the function code itself,
  I'm much more likely to keep it updated when I change the code.  
Makes

  it easier to find too, I think...


I think that's one of those lines along which you can divide all Perl  
programmers into one of two camps isn't it? I'm a documentation at  
the bottom kind of guy. I prefer to be able to see the surrounding  
documentation as I'm writing.


Not a big thing but I don't think either way is actually wrong or  
worse. It probably depends on how the task of writing documentation  
relates to coding for each individual.


--
Andy Armstrong, hexten.net



CPANTS?

2007-03-06 Thread Andy Armstrong
Does anyone apart from Thomas Klausner know anything about the status  
of CPANTS? It's been down for about five days now.


I'm trying to offer him free hosting for it but he doesn't seem to be  
getting his mail just now either.


--
Andy Armstrong, hexten.net



Re: supporting older perls

2007-02-25 Thread Andy Armstrong

On 25 Feb 2007, at 05:02, Greg Matheson wrote:

How do you find out what can be done in older perls?


Is it not possible to build 5.6.2?

Archaeology: this seems to be the birth of use constant:

http://backpan.hexten.net/authors/id/P/PH/PHOENIX/constant-0.01.readme

--
Andy Armstrong, hexten.net



Re: Another non-free license - PerlBuildSystem

2007-02-20 Thread Andy Armstrong

On 19 Feb 2007, at 23:20, David Kaufman wrote:
[snip]

Enjoy!


Superb! :)

--
Andy Armstrong, hexten.net



Re: Delete hate speech module

2007-02-08 Thread Andy Armstrong

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 8 Feb 2007, at 15:06, imacat wrote:

Correction: Time::Cubic.


I got some Time Cube madness on an old blog a few years ago:

http://www.shitshifter.com/forum.jsp?nid=237

See posts by HEED CUBIC PROPHECIES TO AVERT CUBELESS DOOM

- --
Andy Armstrong, hexten.net

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFyz48woknRJZQnCERAqMUAKDJRRyBZOip4zFLPeqUamSvT/w5IQCbBGt4
tLlNqiWmWDDSrtyz0bUb3MU=
=c18O
-END PGP SIGNATURE-


Re: Delete hate speech module

2007-02-08 Thread Andy Armstrong

On 8 Feb 2007, at 17:20, David Landgren wrote:
And as we all know, 99% of modules these days are found through  
searches. I would recommend a much more subtle approach: ask  
Andreas and Randy to... oops... accidentally remove it from their  
indices, and therefore when people search for Time::, it won't show  
up.


Of course the person who uploaded it may subscribe to this list or  
have found the public archives.


--
Andy Armstrong, hexten.net



Re: Delete hate speech module

2007-02-08 Thread Andy Armstrong

On 8 Feb 2007, at 17:36, David Landgren wrote:
And as we all know, 99% of modules these days are found through  
searches. I would recommend a much more subtle approach: ask  
Andreas and Randy to... oops... accidentally remove it from their  
indices, and therefore when people search for Time::, it won't  
show up.
Of course the person who uploaded it may subscribe to this list or  
have found the public archives.


True, but by the same token they've already read the rest of the  
thread, so that's beside the point. Or else I'm missing your point.


Just that if you're hatching a cunning plan it's probably better to  
do it in private :)


--
Andy Armstrong, hexten.net



Re: James Keenan's other modules (was: Re: CGI::Simple)

2007-01-12 Thread Andy Armstrong

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12 Jan 2007, at 10:16, David Landgren wrote:
Do we wait until someone else manifests a need to dust off one of  
them to hand over maintenance? Or do we forget about it until next  
time? If it's worth it, then I would volunteer.


Actually I was thinking of volunteering for the whole lot of them -  
but then decided that they're probably not that valuable to anyone.


I was also wondering whether - given that backpan exists so people  
can always find them if they really want them - there shouldn't be a  
mechanism for removing modules that are unloved and unused.


- --
Andy Armstrong, hexten.net

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (Darwin)

iD8DBQFFp2e0woknRJZQnCERAquJAJ4hKkNHZKS3u3JnhRbcPd9k7xUm9wCfaKfK
M8tnMc8hzZxL8BlEEyAMtVg=
=k1gg
-END PGP SIGNATURE-


Re: James Freenan's (not Keenan's) other modules (was: Re: CGI::Simple)

2007-01-12 Thread Andy Armstrong

On 12 Jan 2007, at 10:56, Adriano Ferreira wrote:


For the record, James Keenan is an active developer
(http://search.cpan.org/~jkeenan/). The modules in question were found
in James Freeman's directory (http://search.cpan.org/~jfreeman/).


Did anyone mention James Keenan?

--
Andy Armstrong, hexten.net



Re: James Freeman's other modules (was: Re: CGI::Simple)

2007-01-12 Thread Andy Armstrong

On 12 Jan 2007, at 10:58, Fergal Daly wrote:

Changing the subject from Keenan to Freeman (James Keenan is not MIA),


Ah - I didn't even read the subject :)

--
Andy Armstrong, hexten.net



Re: James Freeman's other modules

2007-01-12 Thread Andy Armstrong

On 12 Jan 2007, at 15:06, Smylers wrote:

If your hunch turns out to be correct then your service (or whatever)
will turn out to be more useful than the existing one.  People will
start using it.  At that point in can be blessed with more 'official'
status.  For example, consider JJ's Perldoc project: it's something  
that

he did, and is now running 'officially' as perldoc.perl.org.


Sure - I'm not suggesting anyone else should do this - just floating  
an idea.



I guess there are essentially three categories of module

1 active, maintained
2 actively used, abandoned
3 not used, not maintained

It'd be nice to be able to weed out some of the modules in category 3
and identify cat 2 modules with a view to flagging them as abandoned
so that when/if a new maintainer came along the takeover processes
could be fast tracked.


Because in your experience of the past week or so the current  
process is

too slow?


Because it's possible I guess. The process of identifying abandoned  
modules could start before there was a volunteer to take over.



I'm not entirely sure what problem you're trying to solve here.  But
that's largely irrelevant -- because however good your idea is,  
there's

bound to be somebody in the Perl community questioning it or objecting
to it!  So don't wait for approval: just do it, whatever it is, then
show folks.

Good luck!


Thanks :)

--
Andy Armstrong, hexten.net



Re: James Freeman's other modules

2007-01-12 Thread Andy Armstrong

On 12 Jan 2007, at 15:55, Chris wrote:

So... what does the A in CPAN stand for again?


Hang on... It's on the tip of my tongue...


I'm not sure how easy it would be to track #3, because people could be
downloading the modules from other sites, or in different packaged
formats.  And I don't understand what the benefit of removing a  
module would

be just because it isn't deemed to be immediately useful.


Noise reduction / cage cleaning basically.

Everything gets archived in backpan anyway - and I'm not necessarily  
proposing removing things from CPAN - but if we could add some  
metadata about whether a module was actively supported that alone  
might be useful for people.


And actually I'm not really proposing anything concrete - just trying  
to work out how we collectively feel on this topic.


--
Andy Armstrong, hexten.net



Re: CGI::Simple

2007-01-10 Thread Andy Armstrong

On 10 Jan 2007, at 04:07, Ken Williams wrote:
Wow, that's the smoothest I've ever seen one of these transfers  
go.  A useful module, an obviously deadbeat developer, an eager  
volunteer (and only one!), it's the perfect storm.


I think the term 'deadbeat developer' might be a little harsh for  
someone who obviously invested considerable time, care and skill into  
producing a module that many have since found useful :)


--
Andy Armstrong, hexten.net



Re: CGI::Simple

2007-01-10 Thread Andy Armstrong

On 10 Jan 2007, at 11:27, Ovid wrote:

Yes, that was the one I meant.  It seemed like a major obstacle for
this module.


Well that works on an out of the box MP2 installation on my laptop  
here now. MP1 still works too fortunately :)


If it's still supposed to be a drop in replacement for CGI.pm it has  
a few other problems - it no longer passes the CGI.pm conformance  
test (which is disabled in the distro). As I say I'll work through  
all the issues I can find.


Once Ask or whoever gives me permissions the new release will appear  
in the index. For now it can be found here:


http://cpan.org/modules/by-authors/id/A/AN/ANDYA/CGI-Simple-0.078.tar.gz

Cheers.

--
Andy Armstrong, hexten.net



Re: CGI::Simple

2007-01-10 Thread Andy Armstrong

On 10 Jan 2007, at 17:32, David Landgren wrote:


Andy Armstrong did write:

Once Ask or whoever gives me permissions the new release will  
appear in the index. For now it can be found here:
http://cpan.org/modules/by-authors/id/A/AN/ANDYA/CGI- 
Simple-0.078.tar.gz


Ping brian d foy, but I imagine he's already watching this thread.


I've mailed modules@perl.org which I think he watches. I've CC'd this  
to him in case he doesn't thanks.


--
Andy Armstrong, hexten.net



Re: CGI::Simple

2007-01-09 Thread Andy Armstrong

On 9 Jan 2007, at 10:13, Ovid wrote:

I'm not particularly keen on taking over this distribution, but he's
not fixing this bug or even responding.  He also notes that Perl is a
fond corner of [his] past, suggesting that unless someone snags
CGI::Simple, this very popular (and useful!) module will not be fixed.


I'm happy to take it on and fix any outstanding bugs. I was looking  
at it just the other day coincidentally.


--
Andy Armstrong, hexten.net



Re: CGI::Simple

2007-01-09 Thread Andy Armstrong

On 9 Jan 2007, at 10:13, Ovid wrote:


Has anyone heard from James Freeman, the maintainer of CGI::Simple
(http://search.cpan.org/dist/Cgi-Simple/)?  It's not been updated in a
couple of years, the outstanding bugs appear to mostly be related to
the same issue, and I tried emailing him about this using the contact
email he provided at http://www.perlmonks.org/?node=tachyon.

I'm not particularly keen on taking over this distribution, but he's
not fixing this bug or even responding.  He also notes that Perl is a
fond corner of [his] past, suggesting that unless someone snags
CGI::Simple, this very popular (and useful!) module will not be fixed.


I've just made a new release that tidies up the tests (they now use  
Test::More), adds support for mod_perl 2 (tested locally but almost  
certainly needs more testing).


I'm going to hit the mod_perl mailing lists to try to recruit someone  
who can test it in a realistic mp2 environment.


When you say 'the outstanding bugs' were you referring to the mp2  
issue? I'm planning to work through all the bugs but I guessed that  
that one was probably the most pressing.


--
Andy Armstrong, hexten.net



Search CPAN with Google

2006-12-18 Thread Andy Armstrong

I've just been playing with a Google Co-op search of CPAN:

http://www.hexten.net/2006/12/18/search-cpan-with-google

It certainly doesn't beat search.cpan.org all the time - but for some  
queries the fact that the Google search goes deeper pays off.


CPAN's big enough that the quality of the search interface is  
critical - for most people it's the primary interface. I've certainly  
had cases where the search has missed modules that I've subsequently  
discovered indirectly - mentioned on a mailing list or in someone  
else's code.


I imagine it might be politically sensitive to add a Google powered  
search to search.cpan.org - but I'd certainly have found it useful in  
the past.


--
Andy Armstrong, hexten.net



Re: List::RewriteElements

2006-12-17 Thread Andy Armstrong

On 16 Dec 2006, at 17:16, James E Keenan wrote:
So, while List::RewriteElements can certainly be used to transform  
elements of an array, a module name like 'Array::RewriteElements'  
would be overly narrow.


Indeed. I was suggesting that List:: was also too narrow for the same  
reason.


--
Andy Armstrong, hexten.net



Re: List::RewriteElements

2006-12-16 Thread Andy Armstrong

On 15 Dec 2006, at 21:39, David Landgren wrote:
I vote for Transform. Possibly more Data than List but I wouldn't  
argue it for long.


List:: has the connotation doing things to Perl arrays I think.

--
Andy Armstrong, hexten.net



Re: Updating a module that's included in another distro

2006-11-26 Thread Andy Armstrong

On 26 Nov 2006, at 02:08, A. Pagaltzis wrote:

I probably didn't make myself clear; that's exactly what I've
done.  It seems to be confused because it's saying that
Geo::Cache has a  higher version - which it doesn't - it's at
0.06.


$ GET http://search.cpan.org/src/RBOW/Geo-Cache-0.06/lib/Geo/ 
Gpx.pm | grep \$VERSION

0.10


Indeed - and I've uploaded version 0.11.0 of Geo::Gpx which should be  
higher than both. I've just tried again with 0.12 to see what happens.


--
Andy Armstrong, hexten.net



Re: Updating a module that's included in another distro

2006-11-26 Thread Andy Armstrong

On 26 Nov 2006, at 02:57, Joshua ben Jore wrote:

You can't do that. Once a package is versioned, it remains versioned
forever. You'll need to have incrementing version numbers for Geo::Gpx
or somehow get PAUSE to forget that the previous versioned Geo::Gpx
exists. I'm not aware of any way to do that.


I think that Geo::Cache is pretty much unmaintained so maybe the  
solution is to ask Rich Bowen to let me take that over too - unless  
anyone can think of anything else.


--
Andy Armstrong, hexten.net



Re: Updating a module that's included in another distro

2006-11-26 Thread Andy Armstrong

On 26 Nov 2006, at 11:04, Andy Armstrong wrote:
I think that Geo::Cache is pretty much unmaintained so maybe the  
solution is to ask Rich Bowen to let me take that over too - unless  
anyone can think of anything else.


Solved I think - PAUSE didn't like my use of a qv// version literal.  
Thanks everyone.


--
Andy Armstrong, hexten.net



Updating a module that's included in another distro

2006-11-25 Thread Andy Armstrong
I've just uploaded a new version of Geo::Gpx. My permissions for  
Geo::Gpx are listed as 'first-come'. The previous version of Geo::Gpx  
was included in Geo::Cache.


My new version provides legacy support for the functionality in that  
version but implements complete support for generating and parsing  
GPX whereas the original version only provided functionality for  
generating a specific case of a GPX file containing a number of  
waypoints.


Anyway, the PAUSE indexer has failed because:

 status: Not indexed because Geo-Cache-0.06/lib/Geo/Gpx.pm in
 R/RB/RBOW/Geo-Cache-0.06.tar.gz has a higher version  
number

 (0.1)

I spoke to Rich Bowen (the original author) and agreed that I'd take  
over the module and release a new version - but obviously I can't  
because PAUSE thinks Geo::Gpx is part of Geo::Cache. Does anyone know  
what I should do? I could ask Rich to make a release of Geo::Cache  
that had Geo::Gpx as a dependency rather than bundling it - does  
anyone know if that'd fix it?


--
Andy Armstrong, hexten.net



Re: Updating a module that's included in another distro

2006-11-25 Thread Andy Armstrong

On 25 Nov 2006, at 23:19, Jonathan Rockway wrote:


On Saturday 25 November 2006 16:00, Andy Armstrong wrote:


Anyway, the PAUSE indexer has failed because:

  status: Not indexed because Geo-Cache-0.06/lib/Geo/Gpx.pm in
  R/RB/RBOW/Geo-Cache-0.06.tar.gz has a higher version
number
  (0.1)

I spoke to Rich Bowen (the original author) and agreed that I'd take
over the module and release a new version - but obviously I can't
because PAUSE thinks Geo::Gpx is part of Geo::Cache. Does anyone know
what I should do? I could ask Rich to make a release of Geo::Cache
that had Geo::Gpx as a dependency rather than bundling it - does
anyone know if that'd fix it?


That would probably fix it. You should also bump the version number  
of your

module to 0.11, to placate the PAUSE indexer.


I probably didn't make myself clear; that's exactly what I've done.  
It seems to be confused because it's saying that Geo::Cache has a  
higher version - which it doesn't - it's at 0.06.


Presumably it's the fact that Geo::Gpx is currently distributed  
alongside Geo::Cache and I'm trying to set it free on it's own that's  
causing the problem :)



If Geo::Cache needs an older
version of Geo::Gpx to be bundled with it, make sure the $VERSION  
in (the
bundled) Geo::Gpx is lower than the real CPAN version.  That should  
prevent

future version problems.


I don't think that's an issue - I've been careful to make my  
implementation backwards compatible.


--
Andy Armstrong, hexten.net



Re: framework for tail recursion in pure perl, including Ackerman function

2006-08-31 Thread Andy Armstrong

On 31 Aug 2006, at 02:33, Dana Hudes wrote:

I wish to also point out that no Perl book replaces a solid  
grounding in computer science. Tail-end recursion removal is  
certainly a technique covered in the CS literature quite  
extensively. Any undergraduate book on algorithms covers it.  
Sophisticated techniques and new approaches may well be in journal  
articles; I personally haven't done a search of the ACM and IEEE CS  
literature for this topic. If pushed I can pull down 3 different  
textbooks on the subject of algorithms and see what they have to  
say. Remember, MJD and Damian mostly don't invent new techniques.  
Rather, they adapt them to the particular strengths of Perl.


Yes quite - that's all well and good. But this is not even vaguely  
new territory is it? Dealing with tail recursion and deep recursion  
by rewriting a function to use an explicitly managed stack or a queue  
- or by turning the tail call into a goto or whatever is just well  
established practice, no?


I don't have anything against discussion (obviously...) but do we  
need to discuss something that's already so well understood?


--
Andy Armstrong, hexten.net



Re: framework for tail recursion in pure perl, including Ackerman function

2006-08-30 Thread Andy Armstrong

On 30 Aug 2006, at 21:05, David Nicol wrote:

On 8/30/06, Dana Hudes  wrote:

Have you read MJD's _Higher Order Perl_? He addresses tail end
recursion removal.


I've skimmed it... did he put up a module that does it for you?
I realized that I left my prototype/prrof-of-concept off of the
previous message to module authors; here it is -- thanks, I'll
try to review that chapter
tr_framework.pl


Sorry, I've missed something here - how is your 'framework' superior  
to a simple queue based approach?


Oh and I can't believe you've only skimmed HOP - it's a superb book  
that should be mandatory reading if this is an area you're interested  
in.


--
Andy Armstrong, hexten.net



Re: framework for tail recursion in pure perl, including Ackerman function

2006-08-30 Thread Andy Armstrong

On 30 Aug 2006, at 21:28, David Nicol wrote:

I just realized that goto sub is a better framework for implementing
such things, anyway:


I don't think goto sub can really be described as a framework... Or  
if it can may I start describing if() as a decision support system too?



# perl -wle 'sub f{ f()}; f()'
Deep recursion on subroutine main::f at -e line 1.
Out of memory!
# perl -wle 'sub f{ goto f}; f()'
^C
#


Yup, OK.

But why are you showing us this stuff? Who is it for? I'd have  
thought that anyone who was interested would have already read HOP  
and/or worked it out for themselves.


Who on this mailing list do you believe is interested in your  
investigations?



Oh and I can't believe you've only skimmed HOP - it's a superb book
that should be mandatory reading if this is an area you're interested
in.


so was the textbook in Lisp class.


I'm surprised it covered Perl.

--
Andy Armstrong, hexten.net



Re: framework for tail recursion in pure perl, including Ackerman function

2006-08-30 Thread Andy Armstrong

On 30 Aug 2006, at 23:13, David Nicol wrote:

But why are you showing us this stuff? Who is it for? I'd have
thought that anyone who was interested would have already read HOP
and/or worked it out for themselves.


the question is, Is anyone interested in a framework for more
explicit support of tail recursion optimization module?


I'm guessing not - given that there's a well known and not  
particularly ugly technique for rewriting any recursive function  
using an explicit queue. But of course I could be wrong - it wouldn't  
be the first time :)



I'm surprised it covered Perl.


Why is everyone being so difficult the last month?


Sorry - flippancy as humour. It should probably be deprecated or  
something.


--
Andy Armstrong, hexten.net



Re: Give up your modules!

2006-08-24 Thread Andy Armstrong

On 24 Aug 2006, at 08:33, Andreas J. Koenig wrote:

That's what the DSLIP status already knows as

S (Support Level): a (abandoned)


I guess the problem is that there's not a pervasive culture of people  
setting their modules to abandoned when they decide to abandon them.


I imagine that a lot of time can pass between someone maintaining a  
module for the last time and eventually deciding that they aren't  
supporting it - human nature being what it is.


--
Andy Armstrong, hexten.net



Smoke (was Re: Give up your modules!)

2006-08-24 Thread Andy Armstrong

On 24 Aug 2006, at 13:59, David Golden wrote:
I want to endorse imacat on her contributions.  She runs one of the  
best smoke testers on cpan-testers: it's really strict and seems to  
catch lots of people out on subtle dependency problems.  She's also  
been very responsive to questions I've had about failed test  
reports.  These are contributions I value highly.


That reminds me of something I've been meaning to investigate - is  
there a guide anywhere or a starting point about running smoke.


I'm running smoke on two machines here - but they're both out of the  
box setups and I'd like to provide more benefit if possible.


What specifically is imacat doing that makes her an example of best  
practice and how may others do something similar?


--
Andy Armstrong, hexten.net



Re: Smoke (was Re: Give up your modules!)

2006-08-24 Thread Andy Armstrong

On 24 Aug 2006, at 14:13, David Golden wrote:
She would have to answer that definitively, but from what I can  
tell, it looks like she might be using an isolated, fresh perl  
installation (that isn't even in the $PATH) that gets reset after  
each smoke.  From test reports I've seen, it looks like the whole  
non-core prerequisite chain gets installed from scratch for each  
module tested.


Ah right; that makes sense, thanks. I've got snapshots of out-of-the- 
box 5.8.8 and 5.9.4 installs that I use for testing locally - I'll  
have a look at hooking that up to smoke.


Cheers :)

--
Andy Armstrong, hexten.net



Re: [EMAIL PROTECTED] mail addresses

2006-08-20 Thread Andy Armstrong

On 21 Aug 2006, at 01:29, Paul LeoNerd Evans wrote:
Any suggestions on who I should ask about this? Who maintains the  
mailer

there?


I don't know specifically who's responsible for mail. It might be  
worth mailing Andreas unless anyone knows better. His address is near  
the end of this page:


https://pause.perl.org/pause/query?ACTION=pause_04about

--
Andy Armstrong, hexten.net