% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hotpatch.R
\name{undo_patch}
\alias{undo_patch}
\title{Undo a previously injected patch}
\usage{
undo_patch(pkg, names = NULL)
}
\arguments{
\item{pkg}{Package name or environment.}

\item{names}{Character vector of patched object names to restore. If NULL, restore all stored backups for pkg.}
}
\value{
Invisibly TRUE on success.
}
\description{
Undo a previously injected patch
}
\examples{
# First inject a patch
inject_patch(
  pkg = "hotpatchR",
  patch_list = list(dummy_child_func = function(x) {
    paste("I am PATCHED! Input:", x)
  })
)

# Call with patched function
patched <- dummy_parent_func("test")
print(patched)

# Restore the original function
undo_patch(pkg = "hotpatchR", names = "dummy_child_func")

# Now it's back to the original
restored <- dummy_parent_func("test")
print(restored)
}
