Basically one continuous piece is what the barrel is and welding or sticking anything onto a barrel doesn't count towards barrel length.Barrel length
(2) For the purposes of this Part, the length of a barrel of a firearm is
(a) in the case of a revolver, the distance from the muzzle of the barrel to the breach end immediately in front of the cylinder, and
(b) in any other case, the distance from the muzzle of the barrel to and including the chamber,
but does not include the length of any component, part or accessory including any component, part or accessory designed or intended to suppress the muzzle flash or reduce recoil.
Criminal code of Canada