The generalized Cartan–Hadamard conjecture says that if $\Omega$ is a domain with fixed volume in a complete, simply connected Riemannian $n$-manifold $M$ with sectional curvature $K \le \kappa \le 0$, then $\partial\Omega$ has the least possible boundary volume when $\Omega$ is a round $n$-ball with constant curvature $K=\kappa$. The case $n=2$ and $\kappa=0$ is an old result of Weil. We give a unified proof of this conjecture in dimensions $n=2$ and $n=4$ when $\kappa=0$, and a special case of the conjecture for $\kappa < 0$ and a version for $\kappa > 0$. Our argument uses a new interpretation, based on optical transport, optimal transport, and linear programming, of Croke's proof for $n=4$ and $\kappa=0$. The generalization to $n=4$ and $\kappa \ne 0$ is a new result. As Croke implicitly did, we relax the curvature condition $K \le \kappa$ to a weaker candle condition Candle}$(\kappa)$ or LCD}$(\kappa)$. We also find counterexamples to a naïve version of the Cartan–Hadamard conjecture: For every $\epsilon > 0$, there is a Riemannian $\Omega \cong B^3$ with $(1-\epsilon)$-pinched negative curvature, and with $|\partial\Omega|$ bounded by a function of $\epsilon$ and $|\Omega|$ arbitrarily large. We begin with a pointwise isoperimetric problem called "the problem of the Little Prince". Its proof becomes part of the more general method.