This paper discusses the derivation of an effective shell-model hamiltonian starting from a realistic nucleon-nucleon potential by way of perturbation theory. More precisely, we present the state of the art of this approach when the starting point is the perturbative expansion of theQ-box vertex function. Questions arising from diagrammatics, intermediate-states and orderby-order convergences, and their dependence on the chosen nucleon-nucleon potential, are discussed in detail, and the results of numerical applications for the p-shell model space starting from chiral next-to-next-to-next-to-leading order potentials are shown. Moreover, an alternative graphical method to derive the effective hamiltonian, based on theẐ-box vertex function recently introduced by Suzuki et al., is applied to the case of a non-degenerate (0+2) ω model space. Finally, our shell-model results are compared with the exact ones obtained from no-core shell-model calculations.