Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Localhost network interaction in tests

by fullermd (Curate)
on Jan 02, 2012 at 00:32 UTC ( #945815=note: print w/ replies, xml ) Need Help??


in reply to Re: Localhost network interaction in tests
in thread Localhost network interaction in tests

[...] Test::HTTP::LocalServer [...] substitute the base URI for accessing the modem to be a file:// URI instead.

T:HTTP::LocalServer seems to pretty much mirror what I'm doing. With a bit less hardcoded single-purpose, anyway.

I don't like the idea of going file:/// though, since that means I'd have to add an extra magic hook in the code to say "here, use this fake URL instead", which would defeat a lot of the purpose of running through the code path in the first place. It would still run the LWP bits, but the URL construction would be bypassed. Also doesn't give it the chance to double check that it properly errors on 404 as the test currently does either.


Comment on Re^2: Localhost network interaction in tests
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://945815]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-04-21 02:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (489 votes), past polls