[LON-CAPA-cvs] cvs: loncom /auth localstudentphoto.pm /enrollment localenroll.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Fri, 10 Feb 2006 02:38:59 -0000
raeburn Thu Feb 9 21:38:59 2006 EDT
Modified files:
/loncom/enrollment localenroll.pm
/loncom/auth localstudentphoto.pm
Log:
Allow for the addition of new subroutines to local*.pm packages in the future, in a way that will prevent errors if undefined subroutines are called in customized versions.
Index: loncom/enrollment/localenroll.pm
diff -u loncom/enrollment/localenroll.pm:1.13 loncom/enrollment/localenroll.pm:1.14
--- loncom/enrollment/localenroll.pm:1.13 Tue Feb 7 11:36:10 2006
+++ loncom/enrollment/localenroll.pm Thu Feb 9 21:38:46 2006
@@ -1,6 +1,6 @@
# functions to glue school database system into Lon-CAPA for
# automated enrollment
-# $Id: localenroll.pm,v 1.13 2006/02/07 16:36:10 albertel Exp $
+# $Id: localenroll.pm,v 1.14 2006/02/10 02:38:46 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -416,4 +416,23 @@
return ($update,$comment);
}
+###############################
+# sub AUTOLOAD
+#
+# Incoming data: none
+# Returns ''
+#
+# Prevents errors when undefined subroutines are called in this package
+# Will allow new routines added in the future to be called from lond etc.
+# without the need for customized versions of local*.pm packages to be
+# modified to include the new subroutines immediately.
+#
+# See "Programming Perl" 3rd ed. pp 296-298.
+###############################
+
+sub AUTOLOAD {
+ our $AUTOLOAD;
+ return '';
+}
+
1;
Index: loncom/auth/localstudentphoto.pm
diff -u loncom/auth/localstudentphoto.pm:1.3 loncom/auth/localstudentphoto.pm:1.4
--- loncom/auth/localstudentphoto.pm:1.3 Tue Feb 7 00:08:24 2006
+++ loncom/auth/localstudentphoto.pm Thu Feb 9 21:38:59 2006
@@ -1,6 +1,6 @@
# The LON-CAPA dummy student photo fetch mechnism
#
-# $Id: localstudentphoto.pm,v 1.3 2006/02/07 05:08:24 raeburn Exp $
+# $Id: localstudentphoto.pm,v 1.4 2006/02/10 02:38:59 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -81,6 +81,24 @@
return ($fullsize,$thumbsize);
}
+###############################
+# sub AUTOLOAD
+#
+# Incoming data: none
+# Returns ''
+#
+# Prevents errors when undefined subroutines are called in this package
+# Will allow new routines added in the future to be called from lond etc.
+# without the need for customized versions of local*.pm packages to be
+# modified to include the new subroutines immediately.
+#
+# See "Programming Perl" 3rd ed. pp 296-298.
+###############################
+
+sub AUTOLOAD {
+ our $AUTOLOAD;
+ return '';
+}
1;
__END__