TERMCAP + CCAN mailing list

Alias on 2007-11-30T07:08:26

Now OSDC.AU is over for another year, my focus turns back to getting unfinished projects over the line.

In the firing line (other than ongoing Strawberry Perl stuff) is my the repository manager, and firming up the dependency list and installation process for it.

Key here is relatively unreliable CGI::Capture, which is failing tests when a large TERMCAP environment value is set. But I can't replicate it myself.

If someone has a TERMCAP value longer than 100 characters I would greatly appreciate a Data::Dumper dump of it, so I can get to the bottom of the problem.

In CCAN news, kernel dev Rusty Russel is working on the CCAN.

He has already heavily bug-fixed abd refactored libtap, the C implementation of TAP/Test::More, as the testing mechanism for "CCAN Distribution" is one area in which the direction to proceed seems relatively clear. By using a /t directory containing small C applications that generate TAP, we can simply start with the existing Perl harness code and get a working "make check" in no time flat.

I believe he also intends to Debian'ify libtap at some point.

Some things are less clear, and will require more discussion.

Things like cross-compilation and what it is exactly that CCAN will hold (libs? includes? utility stuff?)

To this end, Rusty and OZLABS has set up a mailing list for CCAN discussion.


TERMCAP

mauzo on 2007-12-04T17:09:52

I don't know if you've got anywhere with this yet, but a minimal example that breaks is

$ diff -u t/03_yaml.t{.orig,}
--- t/03_yaml.t.orig    Tue Dec  4 17:03:08 2007
+++ t/03_yaml.t Tue Dec  4 17:03:29 2007
@@ -11,7 +11,8 @@

# Test YAML support
SKIP: {
-       skip( "TERMCAP currently breaks YAML::Tiny", 6 ) if $ENV{TERMCAP};
+       #skip( "TERMCAP currently breaks YAML::Tiny", 6 ) if $ENV{TERMCAP};
+        $ENV{TERMCAP} = "foo\\\n\tbar";

        my $cgi = CGI::Capture->new;
        isa_ok( $cgi, 'CGI::Capture' );
$ perl -Mblib t/03_yaml.t
1..6
ok 1 - The object isa CGI::Capture
ok 2 - ->capture ok
ok 3 - The object isa YAML::Tiny
not ok 4 - YAML object round-trips ok
#   Failed test 'YAML object round-trips ok'
#   at t/03_yaml.t line 26.
#     Structures begin differing at:
#          $got->[0]{ENV}{TERMCAP} = 'foo\
#       bar'
#     $expected->[0]{ENV}{TERMCAP} = 'foo\
#     REF(0x83128f4)bar'
ok 5 - ->as_yaml returns a YAML document
not ok 6 - CGI::Capture round-trips ok
#   Failed test 'CGI::Capture round-trips ok'
#   at t/03_yaml.t line 34.
#     Structures begin differing at:
#          $got->{ENV}{TERMCAP} = 'foo\
#       bar'
#     $expected->{ENV}{TERMCAP} = 'foo\
#     REF(0x832acf0)bar'
# Looks like you failed 2 tests of 6.

For some reason YAML::Tiny chokes on the "\\\n\t" sequence, and thinks it should be a ref. Large TERMCAPs tend to be whole termcap entries (screen is a common culprit here: it insists on putting the whole entry in the environment) which always contain that sequence.

Re:TERMCAP

Alias on 2007-12-05T00:48:33

Awesome, thanks for this.