[Catalyst-commits] r14385 - CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model

karpet at dev.catalyst.perl.org karpet at dev.catalyst.perl.org
Mon Nov 5 03:13:42 GMT 2012


Author: karpet
Date: 2012-11-05 03:13:42 +0000 (Mon, 05 Nov 2012)
New Revision: 14385

Modified:
   CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm
Log:
document put_related

Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm	2012-11-05 03:08:55 UTC (rev 14384)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm	2012-11-05 03:13:42 UTC (rev 14385)
@@ -269,14 +269,15 @@
     }
 }
 
-=head2 add_related( I<file>, I<rel_name>, I<other_file_name> )
+=head2 add_related( I<file>, I<rel_name>, I<other_file_name>, I<overwrite> )
 
 For I<rel_name> of "dir" will create a symlink for I<other_file_name>'s
 basename to I<file> in the same directory as I<file>.
 
 If a file already exists for I<other_file_name> in the same
 dir as I<file> will throw an error indicating the relationship
-already exists.
+already exists. To stop the error being thrown, pass a true
+value for the I<overwrite> param.
 
 If the symlink fails, will throw_error().
 
@@ -325,6 +326,12 @@
     return $other_file;
 }
 
+=head2 put_related( I<file>, I<rel_name>, I<other_file_name> )
+
+Calls add_related() with overwrite option.
+
+=cut
+
 sub put_related {
     my $self = shift;
     return $self->add_related( @_, 1 );    # overwrite




More information about the Catalyst-commits mailing list