Nick Glencross wrote:
Hmmm. still don't think that's what I want. Obviously this is in the
context of the NCI callback stuff that I'm looking into -- no surprises
there.
Ah callbacks again. As these are called by C code, you really should not
a function signature at compile-time.
In case 2
Leopold Toetsch wrote:
On Oct 30, 2005, at 1:54, Nick Glencross wrote:
Quick question...
I've been looking through inter_run and extend to see how to pass
arguments to a parrot method/function from C, but all the prototypes
that I've seen have '...' or 'va_list' to accept the arguments.
On Oct 30, 2005, at 1:54, Nick Glencross wrote:
Quick question...
I've been looking through inter_run and extend to see how to pass
arguments to a parrot method/function from C, but all the prototypes
that I've seen have '...' or 'va_list' to accept the arguments.
If I don't know what the
Quick question...
I've been looking through inter_run and extend to see how to pass
arguments to a parrot method/function from C, but all the prototypes
that I've seen have '...' or 'va_list' to accept the arguments.
If I don't know what the arguments or their respective types are at
compile
I'll dig it out. If you can take it and work out a way to fit it into
the existing HTML::Tidy, that would be the big prize, I think - I
worked out a way to do this, in part, but I'm not so sure about it now.
On 14 Aug 2005, at 16:19, Rhesa Rozendaal wrote:
On Aug 14, 2005, at 6:47 AM, jo / ak
On Aug 14, 2005, at 6:47 AM, jo / ak wrote:
Hi,
how can arguments be passed to an HTML::Tidy clean() call? Eg.
'char-encoding' => 'latin1' to avoid translation to entities?
On 14 Aug 2005, at 14:46, Andy Lester wrote:
You can't at this point. Code hasn't been written to support it.
--.
Andy - the alternative version of the code I wrote and sent to you will
do this.
I'm afraid I got busy on other stuff and forgot all about it, and I
probably don't have the time to refactor my stuff into yours now, but
if you would like to, be my guest.
Mike
On 14 Aug 2005, at 14:46, Andy L
On Aug 14, 2005, at 6:47 AM, jo / ak wrote:
Hi,
how can arguments be passed to an HTML::Tidy clean() call? Eg.
'char-encoding' => 'latin1' to avoid translation to entities?
You can't at this point. Code hasn't been written to support it.
--.
Andy Lester => [EMAIL PROTECTED] => www.petdanc
Hi,
how can arguments be passed to an HTML::Tidy clean() call? Eg.
'char-encoding' => 'latin1' to avoid translation to entities?
Can anyone help?
Regards, Jo
Ovid wrote:
> --shuffle will shuffle the order in which the tests are run to ensure that
> you have no accidental dependency on test order.
>
> --fast sets and environment variable that can be checked in the test scripts.
> For example, if you have a couple of tests that double the time of your tes
-BEGIN PGP SIGNED MESSAGE-
Moin,
On Sunday 14 September 2003 07:37, Andrew Savige wrote:
> Ovid wrote:
[snip]
> functionality seems to be superseded by Apache::TestHarness run() method.
>
ObDisclaimer: I haven't got a clue what you are talking about, but this bit
caught my attention:
>
Ovid wrote:
> I've just made it available at
> http://users.easystreet.com/ovid/cgi_course/downloads/grind.gz
>
> It needs more work, including allowing descending into directories (via
> File::Find or a similar mechanism) and having pre and post actions.
> I haven't figured out the best way to do
5.8.1 recently started failing 2 tests in op/cproto.t, on pop(), shift();
this only happens on one box, ie RH-7.2, not RH-9, and I havent tried
a make distclean, so I havent reported it to p5p.
Instead I decided that some false laziness was in order, and I should go
digging.
But, I thought it wo
On Thursday, Sep 11, 2003, at 16:38 Europe/London, Ovid wrote:
--- Andrew Savige <[EMAIL PROTECTED]> wrote:
Oh, that 'grind' looks like a very handy command but I'm a bit
confused about how you use it. Is it just a handy general-purpose
command or do you use it specifically as part of "make te
--- Andrew Savige <[EMAIL PROTECTED]> wrote:
> Oh, that 'grind' looks like a very handy command but I'm a bit
> confused about how you use it. Is it just a handy general-purpose
> command or do you use it specifically as part of "make test" in
> your CPAN distributions?
It's a utility that I w
Ovid wrote:
> I do something like the following to get this effect:
>
> #!/usr/bin/perl -w
> use strict;
> use Test::Harness;
> use Getopt::Long;
> use Pod::Usage;
>
> GetOptions(
> 'help|?'=> sub { pod2usage(-verbose => 2); exit },
> 'verbose!' => \$Test::Harness::verbos
--- Andrew Savige <[EMAIL PROTECTED]> wrote:
> Fergal Daly wrote on 14 July 2003:
> > is it possible with Test::Harness and MakeMaker to pass arguments to
> > my test scripts? I think it's not but I just want to check for sure.
> > The module I'm working on is getting a new "optimised" mode so I'
Fergal Daly wrote on 14 July 2003:
> is it possible with Test::Harness and MakeMaker to pass arguments to
> my test scripts? I think it's not but I just want to check for sure.
> The module I'm working on is getting a new "optimised" mode so I'd like
> to be able to run all the tests twice, once
On Wed, Aug 20, 2003 at 10:34:33PM +1000, Andrew Savige wrote:
> Not to mention Semi::Semicolons.
I blame Ziggy for that one.
> You'll have to take my word for it when I claim that I finally realised
> why you'd chosen "Straps" ... right after I pressed the send button.
> Maybe after that "is my
A moron once wrote:
> I have a similar problem; I'd like some of my test programs
> to generate other test programs on the fly, then run them.
>
> This seems to work:
>
> use strict;
> use Test::Harness;
> my $outf = 'out.tmp';
> print "1..1\n";
> local *SAVOUT; open(SAVOUT, ">&STDOUT"); # save or
Michael G Schwern wrote:
> On Wed, Aug 20, 2003 at 07:18:54PM +1000, Andrew Savige wrote:
> > I admit to asking my original question as a joke since, as of Perl
> 5.6.1,
> > Test::Harness was pure functional (Test::Harness::Straps no there).
> > However, I am not joking now when I say I have no ide
On Wed, Aug 20, 2003 at 07:18:54PM +1000, Andrew Savige wrote:
> I admit to asking my original question as a joke since, as of Perl 5.6.1,
> Test::Harness was pure functional (Test::Harness::Straps no there).
> However, I am not joking now when I say I have no idea what "Straps"
> means.
harness
Michael G Schwern wrote:
> On Thu, Jul 24, 2003 at 10:55:57AM +1000, Andrew Savige wrote:
>> I'd be interested to see an example of sub-classing Test::Harness.
>
> See examples/mini_harness.plx in Test::Harness.
>
> The straps interface is not yet entirely usable.
Thanks. Looks interesting.
I ad
On Thu, Jul 24, 2003 at 10:55:57AM +1000, Andrew Savige wrote:
> I'd be interested to see an example of sub-classing Test::Harness.
See examples/mini_harness.plx in Test::Harness.
The straps interface is not yet entirely usable.
--
Michael G Schwern[EMAIL PROTECTED] http://www.pobox.c
On Thu, Jul 24, 2003 at 09:17:02AM -0400, Potozniak, Andrew wrote:
> &Test::More::is(1,1,"One equals One!!");
> &Test::More::is(1,2,"Does one equal two??");
You probably don't want to be calling those with the & in front of them
either as that'll make them bypass the prototype.
And as the Test fu
Andrew Potozniak <[EMAIL PROTECTED]> writes:
>>I'm afraid your code won't work.
>
>As stated below I got it to work with my example :-p
>
>>Okay, you've subclassed a functional module. But this means that
>>you'll be >passing the package name as the first argument, not a test
>>name. This will
> #!/usr/bin/perl
> use strict;
> use warnings;
>
> sub my_fn { print "in sub my_fn, args='@_'\n" }
>
> # This happily calls my_fn(): the parameters received by my_fn are
> # 'sample.t' and 'def'. But why?
>
> 'sample.t'->main::my_fn('def');
>
> # ... yet this fails with: Can't call method "mai
Andrew P's test program does indeed "work" with Perl 5.8.0
on both Unix and Windows with a test name of 'sample.t' in
THDriver.pl, yet changing it to './sample.t' results in a
failure of: Can't call method "SUPER::runtests" without a
package or object reference. But why?
The snippet below (tested
-Original Message-
From: chromatic [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 12:56 PM
To: Potozniak, Andrew
Cc: '[EMAIL PROTECTED]'
Subject: Re: passing arguments to tests
On Thursday, July 24, 2003, at 09:46 AM, Potozniak, Andrew wrote:
>> Correct me
On Thursday, July 24, 2003, at 09:46 AM, Potozniak, Andrew wrote:
Correct me if I'm wrong but calling $self->SUPER::somesub calls a sub
in the
functional context which will not pass the "calling class" along with
it.
Okay, you're wrong. :)
'SUPER::' is just a hint to the method dispatcher to m
>I'm afraid your code won't work.
As stated below I got it to work with my example :-p
>Okay, you've subclassed a functional module. But this means that
>you'll be >passing the package name as the first argument, not a test
>name. This will generate a "this >test does not exist" warning with
I'm afraid your code won't work.
> package TestHarnessSubClass;
[snip]
> #This creates TestHarnessSubClass into a sub class of Test::Harness
> use base "Test::Harness";
[snip]
> sub runtests{
> my $self = shift;
[snip]
> $self->SUPER::runtests(@_);
> }
Okay, you've subclassed a functional mo
iak
Administrative Computing
Student Assistant
State University of New York at Buffalo
[EMAIL PROTECTED]
645-3587 x 7123
---
-Original Message-
From: Andrew Savige [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 23, 2003 8:56 PM
To: Po
"Potozniak, Andrew" wrote:
> Create a sub class of Test::Harness and or MakeMaker that will over-ride
> all of their methods/subroutines and then add what you want it to do,
> don't forget to call super classes' method/subroutine that you are
> over-riding. I can give an example of this if need be.
>>Fergal Daly wrote:
>> Hi,
>> is it possible with Test::Harness and MakeMaker to pass arguments
>> to my test scripts? I think it's not but I just want to check for sure.
>> The module I'm working on is getting a new "optimised" mode so I'd like
>> to be able to run all the tests twice, once
Fergal Daly wrote:
> Hi,
> is it possible with Test::Harness and MakeMaker to pass arguments
> to my test scripts? I think it's not but I just want to check for sure.
> The module I'm working on is getting a new "optimised" mode so I'd like
> to be able to run all the tests twice, once with
What's wrong with creating these as subtests within a single .t file?
Are you trying to avoid that?
Have you looked at Test::Cmd? If I remember right, it's geared for
testing command-line applications rather than modules.
FWIW, the black box test harness I used to use allowed specifying an
ar
On Sun, Jul 13, 2003 at 04:13:07PM +0100, Fergal Daly wrote:
> On Sunday 13 July 2003 15:53, Paul Johnson wrote:
> > The way I deal with this is to make a module that does all the heavy
> > lifting, give it an appropriate import sub, and then a test reduces to
> > something like:
> >
> > use Tes
On Sunday 13 July 2003 15:53, Paul Johnson wrote:
> The way I deal with this is to make a module that does all the heavy
> lifting, give it an appropriate import sub, and then a test reduces to
> something like:
>
> use TestX ( opt1 => "x", opt2 => "y" )
>
> That covers everything except the pe
On Sun, Jul 13, 2003 at 03:22:43PM +0100, Fergal Daly wrote:
> Hi,
> is it possible with Test::Harness and MakeMaker to pass arguments to my test
> scripts? I think it's not but I just want to check for sure. The module I'm
> working on is getting a new "optimised" mode so I'd like to be able to ru
Hi,
is it possible with Test::Harness and MakeMaker to pass arguments to my test
scripts? I think it's not but I just want to check for sure. The module I'm
working on is getting a new "optimised" mode so I'd like to be able to run
all the tests twice, once with and once without the opti
On Sun, Sep 29, 2002 at 09:31:46PM -, Smylers wrote:
> Consider this Perl 5:
>
> while (<>)
> {
> # ...
> foreach my $fruit (qw)
> {
> # ...
> }
> }
>
> Inside the inner loop C<$_> still holds the current line. In the
> equivalent Perl 6 syntax, insider the inne
Paul Johnson wrote:
> On Sat, Sep 21, 2002 at 10:05:50AM -, Smylers wrote:
>
> > Many Perl programs use C<$_> to mean
> > 'the current line'. 'A2' gives the Perl 6 syntax for this as:
> >
> >while $STDIN {
> >
> > Maybe somewhere in the middle of
> > it, it's necessary to have a C loo
On 21 Sep 2002, Smylers wrote:
> Larry Wall wrote:
>
> > On 20 Sep 2002, Aaron Sherman wrote:
> >
> > : Does that mean that I can't
> > :
> > : for $x -> $_ {
> > : for $y -> $z {
> > : print "$_, $z\n";
> > : }
> > : }
> > :
> > : And exp
On Sat, Sep 21, 2002 at 10:05:50AM -, Smylers wrote:
> Larry Wall wrote:
>
> > On 20 Sep 2002, Aaron Sherman wrote:
> >
> > : Does that mean that I can't
> > :
> > : for $x -> $_ {
> > : for $y -> $z {
> > : print "$_, $z\n";
> > : }
> > :
Larry Wall wrote:
> On 20 Sep 2002, Aaron Sherman wrote:
>
> : Does that mean that I can't
> :
> : for $x -> $_ {
> : for $y -> $z {
> : print "$_, $z\n";
> : }
> : }
> :
> : And expect to get different values?
>
> That's correct. N
Personally, I like the looks of
sub foo($a, $b is given) { ... }
> Does this mean that we allow/encourage uses of $_ other than as a default
> for an optional argument? I think it would be less confusing and
> error-prone to associate the underscore-aliasing with the parameter $_
> wil
On Fri, 20 Sep 2002, Sean O'Rourke wrote:
: On Fri, 20 Sep 2002, Larry Wall wrote:
: > The current thinking as of Zurich is that the "given" passes in
: > separate from the ordinary parameters:
: >
: > sub ($a,$b,$c) is given($x) {...}
: >
: > That binds the dynamically surrounding $_ to $x as
Larry said:
> BTW, latest leaning is toward = rather than //= for parameter
> defaults, ...
Horray!
Sorry. Couldn't resist. :-)
-angel
"Simple men are happy with simple presents"
On Fri, 20 Sep 2002, Larry Wall wrote:
> The current thinking as of Zurich is that the "given" passes in
> separate from the ordinary parameters:
>
> sub ($a,$b,$c) is given($x) {...}
>
> That binds the dynamically surrounding $_ to $x as an out-of-band
> parameter. Can also bind to $_ to mak
On 20 Sep 2002, Aaron Sherman wrote:
: I assumed that's what C was. It does have the disadvantage of
: looking like variable assignment, though.
BTW, latest leaning is toward = rather than //= for parameter defaults,
since it can, in fact, be undef if the parameter is supplied, while //=
seems to
On 20 Sep 2002, Aaron Sherman wrote:
: On Fri, 2002-09-20 at 10:36, Larry Wall wrote:
: > On Thu, 19 Sep 2002, Brent Dax wrote:
:
: > : (An aside: it strikes me that you could use C as a scoped lexical
: > : alias, i.e.
: > : given $bar -> $foo {
: > : print $foo;
: > : }
:
: > Sur
On Fri, 20 Sep 2002, Brent Dax wrote:
: Larry Wall:
: # That binds the dynamically surrounding $_ to $x as an
: # out-of-band parameter. Can also bind to $_ to make it the
: # current topic.
:
: The problem I have with that is this:
:
: sub for_trace(*@array, &block) {
: l
On Fri, 2002-09-20 at 10:36, Larry Wall wrote:
> On Thu, 19 Sep 2002, Brent Dax wrote:
> : (An aside: it strikes me that you could use C as a scoped lexical
> : alias, i.e.
> : given $bar -> $foo {
> : print $foo;
> : }
> Sure, though it also aliases to $_.
>
Does that mean
Larry Wall:
# That binds the dynamically surrounding $_ to $x as an
# out-of-band parameter. Can also bind to $_ to make it the
# current topic.
The problem I have with that is this:
sub for_trace(*@array, &block) {
loop($_=0; $_ < @array; $_++) {
On Thu, 19 Sep 2002, Brent Dax wrote:
: Aaron Sherman:
: # topicalize: To default to C<$_> in a prototype (thus
: # acquiring the caller's current topic).
:
: Well, to topicalize a region of code is actually to specify a different
: topic, that is, a different value for $_. For example:
:
:
Aaron Sherman:
# topicalize: To default to C<$_> in a prototype (thus
# acquiring the caller's current topic).
Well, to topicalize a region of code is actually to specify a different
topic, that is, a different value for $_. For example:
$foo = new X;
$bar = new Y;
On Sat, 2002-09-14 at 04:16, Luke Palmer wrote:
> When a bare closure is defined, it behaves the same as a signatureless
> sub. That is, it topicalizes the first argument, and hands them all over
> in @_. So your "topic passing" is just, well, passing the topic, like
> any ol' argument.
Ok,
58 matches
Mail list logo