Date: | Thu, 21 Oct 2004 21:25:41 -0500 |
From: | Mark Stosberg <mark [...] summersault.com> |
To: | bug-WWW-Mechanize [...] rt.cpan.org |
CC: | open-source [...] bluebottle.com |
Subject: | wish: improved support for attributes in ::Link |
This patch is stalled while this issue gets worked out:
Rob,
In general this looks good. It turns out that yesterday I also worked on
Link.pm, adding support for an 'alt' attribute. This patch will have a
merge conflict with my work, but that's not a big deal. I created an
alternative interface for Link.pm, because the 6 element (now 7 with
attrs) was unwieldly. So you can also call like this now:
my $link = WWW::Mechanize::Link->new({
url => $url,
text => $text,
name => $name,
tag => $tag,
base => $self->base,
alt => $alt,
attrs => $attrs, # not yet handled
});
###############
Now considering your patch as well, I think we simplify this even
further if we want. We can get all the data we want with parameters:
my $link = WWW::Mechanize::Link->new({
parser_obj => $p,
parser_token => $token,
base => $self->base,
});
To me, this makes more sense because it moves a maximal amount of the
link munging logic into ::Link.
There would still be the option to pass an explicit 7 element array if
you want to.
What do others think about this design alternative?
Mark
----- Forwarded message from Rob Casey <open-source@bluebottle.com> -----
User-Agent: Microsoft-Entourage/10.1.4.030702.0
Date: Thu, 30 Sep 2004 22:31:04 +1000
Subject: Re: [mech-dev]Anchor onclick handling
From: Rob Casey <open-source@bluebottle.com>
To: Andy Lester <andy@petdance.com>
CC: Mark Stosberg <mark@summersault.com>,
www-mechanize-development@lists.sourceforge.net
Show quoted text
----- End forwarded message -----
--
http://mark.stosberg.com/
On 29/9/04 11:40 PM, "Andy Lester" <andy@petdance.com> wrote:
Show quoted text
> The idea of "consensus" is one of the biggest problems with open source.
> We stall on doing something, awaiting approval from "everyone", whoever
> that may be. We spend more time talking about the action to be taken
> instead of JFDIing it.
>
> Yes, write up the patch, and if it makes sense to me to put in, then
> I'll put it in. I'm the only "everyone" that matters anyway. :-)
Attached is a very simple patch which implements the attr behaviour as
suggested by Mark.
Comments and feedback are welcomed.
Regards,
Rob
--
Rob Casey
Technical Manager
Bluebottle Solutions Pty. Ltd.
http://www.bluebottle.com/
Message body is not shown because sender requested not to inline it.