@@ -75,10 +75,11 @@ sub new {
7575 my $envir = shift ; # pointer to environment hash
7676 warn " PGloadmacros must be called with an environment" unless ref ($envir ) eq ' HASH' ;
7777 my $self = {
78- envir => $envir ,
79- macroFileList => {}, # records macros used in compilation
80- macrosPath => ' ' ,
81- pwd => ' ' , # current directory -- defined in initialize
78+ envir => $envir ,
79+ macroFileList => {}, # records macros used in compilation
80+ macrosPath => ' ' ,
81+ pwd => ' ' , # current directory -- defined in initialize
82+ deprecated_macros => [],
8283 };
8384 bless $self , $class ;
8485 $self -> initialize;
@@ -151,11 +152,8 @@ sub loadMacros {
151152 unless ($macro_file_loaded ) {
152153 warn " loadMacros: loading macro file $fileName " if $debugON ;
153154 my $filePath = $self -> findMacroFile($fileName );
154- my @dirs = split (/ \/ / , $filePath );
155- warn " This problem uses the deprecated macro $filePath . It will continue to work but this macro "
156- . ' will be removed in a future version. This problem should be updated to remove this macro '
157- . ' to work.'
158- if $dirs [ $#dirs - 1 ] eq ' deprecated' && $self -> {envir }{isInstructor };
155+ my @dirs = split (' /' , $filePath );
156+ push (@{ $self -> {deprecated_macros } }, $dirs [$#dirs ]) if $dirs [ $#dirs - 1 ] eq ' deprecated' ;
159157
160158 # ### (check for renamed files here?) ####
161159 warn " loadMacros: look for $fileName at |$filePath |" if $debugON ;
0 commit comments