in reply to Re^2: mmap in Perl?
in thread mmap in Perl?

Thanx for checking in, Leon.

It's rather as if something detects the assignment of wrong size and silently refuses. So from outside, bug #1 is either in refusing EXOR in being silent about refusing.

What kind of behaviour do you intend to provide on wrong-sized assignments (too large, too short, undef <=> replace & pad, overwrite beginning, resize mapping)? I don't remember anything in the module docs about what to expect, IIRC (buglet #2, either mine or your's :) ).

cu & thanx,
Peter

Replies are listed 'Best First'.
Re^4: mmap in Perl?
by Anonymous Monk on Oct 22, 2009 at 12:05 UTC

    Bug 1:
    Due to the way perl's internals work, it is impossible to check the new value until after the assignment has happened. If the assignments goes wrong, perl itself reassigns the variable to another piece of memory.

    The way I deal with that is checking after every assignment. For some unknown reason that doesn't happen in this case. In other words, the problem is that it doesn't detect what's going on.

    Bug 2:
    It is supposed to give you a warning when you're doing something like that. I considered making it an exception, but that may be a little