Project

General

Profile

Actions

Bug #2016

closed

"Dumping" a table in mod_magnet does not work

Added by simmel over 15 years ago. Updated over 15 years ago.

Status:
Duplicate
Priority:
Normal
Category:
mod_magnet
Target version:
-
ASK QUESTIONS IN Forums:

Description

When developing and debuging mod_magnet scripts it is sometimes useful to dump a whole table (think: in Ruby: pp an_hash; in Perl: print Dumper \%an_hash;)

This is how to dump a table in Lua, but it doesnt work in mod_magnet which I suspect has something to do with that the print method is redefined my mod_magnet to print to server.errorlog.

-- The "old way" 
table.foreach(lighty.request, print)
-- The "new way" 
  for k,v in pairs(lighty.request) do
    print(k .. "=" .. v)              
  end                   

Related issues 1 (0 open1 closed)

Is duplicate of Feature #1307: Impossible to loop through the lighty.request or lighty.env fieldsFixedActions
Actions #1

Updated by stbuehler over 15 years ago

  • Status changed from New to Duplicate
Actions

Also available in: Atom