Method of making inorganic chlorine-containing perovskite thin films