‘Means of ’ versus ‘means for’

Eating garlic has long been considered as a means for warding off malaise.

Eating garlic has long been considered as a means of warding off malaise

Which example is preferred and why? Many thanks.


Solution 1:

as a means = as a method of doing or achieving something. Any ot the three forms would be acceptable:

Eating garlic has long been considered a means to ward off malaise.

Eating garlic has long been considered an effective means for warding off malaise.

Eating garlic has long been considered a means of warding off malaise.

More examples:

It's an effective means for finding qualified job applicants.

These pledges are a means to avoid prosecution.