Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== Outdated egg! This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for [[/eggref/5/call-with-environment-variables|the CHICKEN 5 version of this egg]], if it exists. If it does not exist, there may be equivalent functionality provided by another egg; have a look at the [[https://wiki.call-cc.org/chicken-projects/egg-index-5.html|egg index]]. Otherwise, please consider porting this egg to the current version of CHICKEN. == call-with-environment-variables Set up and take down environment vars [[toc:]] === {{call-with-environment-variables}} <procedure>(call-with-environment-variables variables thunk) → unspecified</procedure> Sets up environment variable via dynamic-wind which are taken down after thunk. ; {{variables}} : An alist of the form {{'(("var" . "value") ...)}} ; {{thunk}} : The thunk to execute with a modified environment <enscript highlight="scheme">(define (call-with-environment-variables variables thunk) (let ((pre-existing-variables (map (lambda (var-value) (let ((var (car var-value))) (cons var (get-environment-variable var)))) variables))) (dynamic-wind (lambda () (void)) (lambda () (use posix) (for-each (lambda (var-value) (setenv (car var-value) (cdr var-value))) variables) (thunk)) (lambda () (for-each (lambda (var-value) (let ((var (car var-value)) (value (cdr var-value))) (if value (setenv var value) (unsetenv var)))) pre-existing-variables))))) </enscript> === About this egg ==== Author [[/users/klutometis|Peter Danenberg]] ==== Repository [[https://github.com/klutometis/call-with-environment-variables]] ==== License BSD ==== Dependencies * [[hahn]] * [[setup-helper]] ==== Versions ; [[https://github.com/klutometis/call-with-environment-variables/releases/tag/0.1|0.1]] : Initial release ; [[https://github.com/klutometis/call-with-environment-variables/releases/tag/0.1.1|0.1.1]] : Add the actual code. ; [[https://github.com/klutometis/call-with-environment-variables/releases/tag/0.1.2|0.1.2]] : Fix versions. ; [[https://github.com/klutometis/call-with-environment-variables/releases/tag/0.1.3|0.1.3]] : Update docs. ; [[https://github.com/klutometis/call-with-environment-variables/releases/tag/0.1.4|0.1.4]] : With a note about cock-utils ; [[https://github.com/klutometis/call-with-environment-variables/releases/tag/0.1.5|0.1.5]] : Docs ; [[https://github.com/klutometis/call-with-environment-variables/releases/tag/0.1.6|0.1.6]] : Use hahn. ; [[https://github.com/klutometis/call-with-environment-variables/releases/tag/0.1.7|0.1.7]] : Specify hahn-version. ==== Colophon Documented by [[/egg/hahn|hahn]].
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you subtract 21 from 5?