Yeah, if only. The trick is that you want the chlorine attached to a chemical where in water it will get released. There are lots of chemicals containing chlorine that remain attached and where it is in it's higher oxidation state (i.e. not as chloride), some good and some not so good -- PVC, CFC, DDT, vancomycin, etc. -- but there are far fewer where the chlorine readily releases from the chemical in water to form hypochlorous acid. There are hypochlorite chemcials that have a metal ion, including sodium hypochlorite (a liquid that breaks down faster at higher concentrations so is usually limited to around 18% concentration tops), calcium hypochlorite (a solid but is a fire hazard when more concentrated so usually limited to no more than around 73% concentration), lithium hypochlorite (a solid, but limited to around 29% concentration which is 35% available chlorine and is a much more expensive chemical), and chlorine bound to Cyanuric Acid (CYA) as either Dichlor which dissolves readily or Trichlor which dissolves slowly. And then there's pure chlorine as chlorine gas.