This is currently an open bug in a piece of software called pilot-link that I maintain. The package (written in C) comes bundled with Perl bindings (as well as Python, Tcl, and Java bindings) which use XS to link to a shared library that provides the low-level functions. I can't seem to figure out why this particular snippet of perl fails when outputting this one character. Here is the code:
#!/usr/bin/perl use strict; use diagnostics; use warnings; use Carp 'verbose'; use PDA::Pilot; # part of pilot-link, not in CPAN # it's the last value which makes the program fail; # and it fails only for the value 11! my @rec = (0,0,0,0,0,0,0,0,11); my %info = ("type" =>"Data", "creator" =>"XXXX", "name" =>"test"); my $pdb = PDA::Pilot::File::create("test.pdb", \%info ) or die "something went wrong\n"; my $rec = join('', map(chr, @rec)); # It dies here, line 23 $pdb->addRecordRaw($rec,0,0,0);

The error that I'm getting (and ONLY when I use '11' as that last value) is:

Can't call method "Raw" without a package or object reference

If I change that '11' to any other value, it works without a hitch, no errors or warnings.

The function that is being called (found in Pilot.xs) is as follows:

int addRecordRaw(self, data, uid, attr, category) PDA::Pilot::File *self SV *data unsigned long uid int attr int category CODE: { STRLEN len; int result; void *buf; PackRaw; buf = SvPV(data, len); RETVAL = pi_file_append_record(self->pf, buf, len, attr, category, uid); } OUTPUT: RETVAL

The relevant subroutine, 'Raw', is in Pilot.pm, and is as follows:

sub Raw { # Just copy the "raw" item straight through my($self) = @_; return $self->{raw}; }

What am I missing here?


In reply to Odd behavior with a "vertical tab" character by hacker

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.