The overall length of a weapon made from a shotgun or rifle is the distance
between the extreme ends of the weapon measured along a line parallel to
the center line of the bore.
Federal Firearms Regulation Reference Guide
Part 179 definitions 179.11
I didn't actually find the reference there to "being closed", but I would count on it.