The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Attribute::Deprecated - mark deprecated methods


  package SomeObj;
  use Attribute::Deprecated;

  sub do_something_useful : Deprecated {


Mark your deprecated subroutines with this attribute and a warning will be generated when the subroutine is called. This can be used to weed out old code that is calling the obsolete method but should be calling its replacement. It's a little bit easier, and more visually distinctive, to mark the method like this that to insert explicit warnings.


Marty Pauley <>, based on code by Marcel Grünauer <> and Damian Conway <>


Copyright (C) 2001 Kasei

This program is free software; you can redistribute it and/or modify it under the terms of either: a) the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. b) the Perl Artistic License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.