develooper Front page | perl.perl5.porters | Postings from June 2012

confused about concise-xs.t

Thread Next
From:
Dave Mitchell
Date:
June 12, 2012 07:29
Subject:
confused about concise-xs.t
Message ID:
20120612142947.GI2780@iabyn.com
I'm a bit puzzled by some tests in ext/B/concise-xs.t;

Background: I *think* that the tests are checking that a bunch of symbols
created under B::Deparse, such as B::Deparse::PMf_ONCE, are actually
constant subs. Fair enough, *except* that these symbols surely belong
under, and should be tested in, B:: rather than B::Deparse; i.e. B::
defines the symbol B::PMf_ONCE, which B::Deparse happens to import and
thus becomes aliased as B::Deparse::PMf_ONCE.

I spotted this because I've added a bunch of new PMf_ flags which
B::Deparse doesn't need to import, and so the new tests were failing,
when I added the symbols to the B::Deparse part of the test rather than
the B part.

To rephrase as yes/no question: in ext/B/concise-xs.t, should I move
most/all the symbols currently listed here in the constant arrayref:

    B::Deparse => { dflt => 'perl',	# 236 functions
	...
	constant => [qw/ ASSIGN CVf_LVALUE
		     CVf_METHOD LIST_CONTEXT OP_CONST OP_LIST OP_RV2SV
		     ...

to under the 'B' test instead?

-- 
I don't want to achieve immortality through my work...
I want to achieve it through not dying.
    -- Woody Allen

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About