Skip to content

Instantly share code, notes, and snippets.

@HotelCalifornia
Created May 7, 2016 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HotelCalifornia/ff51508101d295f0ea52f79afc8bed69 to your computer and use it in GitHub Desktop.
Save HotelCalifornia/ff51508101d295f0ea52f79afc8bed69 to your computer and use it in GitHub Desktop.
sub get-env {
%env = {};
%env<REQUEST_METHOD> = $.request-method;
%env<REQUEST_URI> = $.request-uri;
%env<SERVER_PROTOCOL> = $.request-version;
%env<SERVER_PORT> = $.server-port.Str;
%env<p6w.version> = Version.new('v0.7.Draft');
%env<p6w.url-scheme> = 'http';
%env<p6w.input> = $.input-supply;
%env<p6w.errors> = $.error-supplier;
%env<p6w.multithread> = False;
%env<p6w.multiprocess> = False;
%env<p6w.run-once> = False;
return %env; # necessary? probably not because the last operation before it deals with %env?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment