For everyone's knowledge (that don't know already)
To see what perks affect what items, look at the tags for that item
<<item name="gunMGT2TacticalAR"> <property name="Tags" value="weapon,ranged,holdBreathAiming,reloadPenalty,gun,barrelAttachments,sideAttachments,smallTopAttachments,mediumTopAttachments,stock,magazine,drumMagazine,firingMode,bottomAttachments,attFortitude,perkMachineGunner,perkBookAutoWeapons,canHaveCosmetic,attachmentsIncluded,machinegunSkill"/><!-- attachmentsIncluded -->
So the Tac Rifle is affected by the Machine Gunner perk and the AutoWeapons books. You can also tell what types of attachments work with weapon.
Edit: Oops, that was A19 code, I got too many tabs opened right now in NotePad++