Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Re: Re: Re: "Useless use of private variable in void context"

by Seumas (Curate)
on Jun 20, 2003 at 22:06 UTC ( #267727=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Re: "Useless use of private variable in void context"
in thread "Useless use of private variable in void context"

Aaah. So it's (essentially) just the old print "BREAK"; technique. That's what I thought you meant, but I considered perhaps by 'binary' you meant that I could literally do some sort of 'binary search' for the line in question. Hah! I'm such a dope some times. Thanks for clearing that up. :)
  • Comment on Re: Re: Re: Re: "Useless use of private variable in void context"

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: "Useless use of private variable in void context"
by BrowserUk (Pope) on Jun 20, 2003 at 22:27 UTC

    Effectively that is a binary search, as you are excluding half of the unknowns at each pass. Even on very large source files, it zeros in on the errant line(s) pretty quickly. You can do the same thing with deliberate error too.

    Enlil reminded me that the quickest way to "comment out" half of the code is to use a __DATA__ statement. Shove it in the middle to start then move it a quarter forward or back as appropriate.

    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://267727]
[ambrus]: choroba: heh heh... I have such a doc bug report somewhere. fixed by now.
[Corion]: Once upon a time I had automatic tests for checking the synopsis, but I stopped doing that because the setup was too fragile on CPAN testers for extracting code from the SYNOPSIS.
[Corion]: Maybe I should move the extraction of the code from the SYNOPSIS section into the author tests, or something like that...
[choroba]: Corion Sounds reasonable
[Corion]: choroba: Yeah - I basically have the same for regenerating README and README.mkdown already, except that I do that in Makefile.PL, but I guess one or the other thing should somehow work ;)
[ambrus]: was this bug: https://rt.cpan. org/Public/Bug/ Display.html?id= 59814
[Corion]: ambrus: Oh - that one would be much harder to automate... The SYNOPSIS section should mostly be a runnable program IMO, but I write only small snippets in my documentation for single functions/methods, and creating the appropriate environment for ...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2017-02-27 12:14 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (383 votes). Check out past polls.